Ensure tools expose prompt() to satisfy callers that invoke tool.prompt() at runtime.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
NVIDIA API blocks browser CORS so needs server-side proxy (sidecar).
OpenRouter/OpenCode allow browser fetch so can use direct API calls
via fetchProviderModels(). This restores OpenRouter/OpenCode model
lists while keeping NVIDIA working via sidecar proxy.
Co-Authored-By: Claude Big Pickle <noreply@anthropic.com>
fix: desktop model list uses sidecar proxy (no CORS) and correct provider names
- Replace fetchProviderModels() (browser CORS block) with modelsApi.list()
(server-side sidecar proxy) to fetch NVIDIA/OpenRouter models
- Derive provider names from ~/.claude.json authProvider field, avoiding
sidecar's stale/corrupted names like "TUI: NVIDIA NIM"
- Fall back to buildDefaultCliModels() when sidecar returns empty
- Remove clearProviderModelCache() since we no longer use providerModels.ts
in settings/provider stores
- Fix ApiFormat type comparison ('openai' -> 'openai_chat'/'openai_responses')
Co-Authored-By: Claude Big Pickle <noreply@anthropic.com>
fix: sync settingsStore when cliAuthStore saves provider config
desktop: fix provider switch model selector real-time update
When switching providers via CliLoginProviderSettings login panels
(NVIDIA, OpenRouter, OpenAI, OpenCode, Local), the settingsStore's
activeProviderId/activeProviderName were never updated, causing the
conversation model's provider badge to stay stale until a full app
restart.
Fixes:
- cliAuthStore: call settingsStore.syncFromConfig() after every save
(saveNvidiaApiKey, saveOpenRouterApiKey, saveOpenAIApiKey,
saveOpenCodeApiKey, saveLocalModelConfig, setAuthProvider,
clearAuth)
- settingsStore: add syncFromConfig() action that re-reads
~/.claude.json and syncs activeProviderId/activeProviderName
- settingsStore: add setActiveProvider() for optimistic UI updates
- settingsStore.fetchAll(): fallback to deriving provider info from
config.authProvider when both direct API fetch and sidecar fail
- ModelSelector: add fallback path when availableModels is empty
(local provider, fetch f…