feat(llm-pi-ai): dormant bare mount — routes live entirely in the settings plane

An empty or omitted providers dict is now the valid dormant posture: the
adapter mounts with zero routes and no catalog entries, registers routes
the moment the llm-pi-ai settings section supplies profiles, and drops
them when it empties. The TUI demo mounts the adapter bare, so adding an
openai/anthropic provider is purely a settings.yaml (or, next PR, web
form) operation with per-request apiKeyEnv credential resolution.
This commit is contained in:
Yichen Jiang
2026-07-29 14:56:09 +08:00
parent 9336fed1e9
commit 4e9916b3e5
13 changed files with 76 additions and 36 deletions

View File

@@ -30,19 +30,14 @@
thinking: enabled
reasoningEffort: max
# The pi-ai multi-provider twin beside the direct adapter: openai + anthropic
# routes register keyless (the catalog stays browsable; a request needs a
# key). Keys resolve per request through the apiKeyEnv references, and a
# `llm-pi-ai:` settings section overrides per provider — proxy baseURL, added
# routes — without a restart.
# The pi-ai multi-provider twin, mounted dormant: zero routes (and no extra
# models in the picker) until a `llm-pi-ai:` settings section supplies
# provider profiles — then those routes register live, keys resolving per
# request through their apiKeyEnv references, and drop again when the
# section empties. Which adapters exist is composition; which providers run
# is the user's settings document.
- id: llm-pi-ai
name: '@deepseek-ai/dsh-llm-pi-ai'
config:
providers:
openai:
apiKeyEnv: OPENAI_API_KEY
anthropic:
apiKeyEnv: ANTHROPIC_API_KEY
# Local executor for the app bundle's bash tool.
# Managed child-process groups for the bash executor (spawn/kill/output plumbing).