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

@@ -16,6 +16,8 @@ flowchart LR
cfg --> plugin_tui_credentials
plugin_tui_llm_deepseek["llm-deepseek<br/>@deepseek-ai/dsh-llm-deepseek"]
cfg --> plugin_tui_llm_deepseek
plugin_tui_llm_pi_ai["llm-pi-ai<br/>@deepseek-ai/dsh-llm-pi-ai"]
cfg --> plugin_tui_llm_pi_ai
plugin_tui_subprocess["subprocess<br/>@deepseek-ai/dsh-subprocess-local"]
cfg --> plugin_tui_subprocess
plugin_tui_bash["bash<br/>@deepseek-ai/dsh-bash-local"]
@@ -77,6 +79,7 @@ flowchart LR
| `settings` | `@deepseek-ai/dsh-settings-local` |
| `credentials` | `@deepseek-ai/dsh-credentials-local` |
| `llm-deepseek` | `@deepseek-ai/dsh-llm-deepseek` |
| `llm-pi-ai` | `@deepseek-ai/dsh-llm-pi-ai` |
| `subprocess` | `@deepseek-ai/dsh-subprocess-local` |
| `bash` | `@deepseek-ai/dsh-bash-local` |
| `tui-agent` | `@deepseek-ai/dsh-tui-demo` |

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).