You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(docs,speed): repoint folded doc link, correct the cap comment
- llm-providers.md pointed at agent-provider-capabilities.ts, which this PR
folded into chat-model.ts; the Docs check was failing on the dead link.
- Rename the orphaned test file to match its subject.
- The cap comment claimed a 50x entry 'clamps to 16'. It does not: the parser
REJECTS it and the field reverts. Note that the bound is editor-input only,
so agent-authored regions can still exceed it.
- normalizeProjectEditor discarded an out-of-range saved speed and fell back to
the 1.5x default; clamp it to the cap instead. Lowering MAX_PLAYBACK_SPEED
widened that silent-reset window from (100,inf) to (16,inf).
Copy file name to clipboardExpand all lines: technical-documentation/architecture/llm-providers.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ The provider layer defines model metadata, protects credentials, discovers model
8
8
|[`electron/ai-edition/llm-config-store.ts`](../../electron/ai-edition/llm-config-store.ts)|`LlmConfigStore` — plain JSON for selection, `safeStorage` blob for credentials. |
9
9
|[`electron/ai-edition/llm-provider-auth.ts`](../../electron/ai-edition/llm-provider-auth.ts)| Model-list discovery per provider. Despite the filename it performs no authentication any more — see [Known gaps](#known-gaps). |
10
10
|[`electron/ai-edition/deep-agent/chat-model.ts`](../../electron/ai-edition/deep-agent/chat-model.ts)|`createOpenScreenChatModel` — the single transport. Picks a `@langchain/*` chat model class per provider. |
11
-
|[`electron/ai-edition/deep-agent/agent-provider-capabilities.ts`](../../electron/ai-edition/deep-agent/agent-provider-capabilities.ts)| Per-provider reasoning-effort capability and its LangChain wire options. |
11
+
|[`electron/ai-edition/deep-agent/chat-model.ts`](../../electron/ai-edition/deep-agent/chat-model.ts)| Per-provider reasoning-effort capability and its LangChain wire options. |
|[`src/components/ai-edition/ProviderSettings.tsx`](../../src/components/ai-edition/ProviderSettings.tsx)| Renders cards and forms directly from `PROVIDER_DEFINITIONS`. |
14
14
@@ -111,14 +111,14 @@ Everything returns `{models, error?}` rather than throwing, so the settings UI c
111
111
112
112
1. Add a complete `ProviderDefinition` in `provider-registry.ts` (auth kind, env keys, default model, base URL, `wireProtocol`, reasoning support). Widen `authKind` if the provider is not API-key-based.
113
113
2. Add a branch in `createOpenScreenChatModel` if none of the three existing adapters fits.
114
-
3. Add a capability branch in `agent-provider-capabilities.ts` if the provider exposes reasoning, and constrain `getReasoningEffortOptions` if its scale is not the full six tiers.
114
+
3. Add a capability branch in `chat-model.ts` if the provider exposes reasoning, and constrain `getReasoningEffortOptions` if its scale is not the full six tiers.
115
115
4. Add a discovery branch in `aiEditionService.llmListProviderModels`, plus its fetch helper in `llm-provider-auth.ts`.
116
116
5. Extend the native-bridge contracts if the provider needs operations the existing IPC surface doesn't cover.
117
117
6. Confirm `ProviderSettings.tsx` renders the right fields from the registry metadata alone, then add registry, transport, and UI tests.
118
118
119
119
## Known gaps
120
120
121
-
-**`normalizeReasoningEffort` in `provider-registry.ts` is dead.** It is exported but has no caller anywhere in the repo; `normalizeReasoningEffortForCapability` in `agent-provider-capabilities.ts` is the live one. The two also disagree — the dead copy's strategy union knows `custom-openai-account` but not `minimax-thinking`. Delete it rather than fixing it.
121
+
-**`normalizeReasoningEffort` in `provider-registry.ts` is dead.** It is exported but has no caller anywhere in the repo; `normalizeReasoningEffortForCapability` in `chat-model.ts` is the live one. The two also disagree — the dead copy's strategy union knows `custom-openai-account` but not `minimax-thinking`. Delete it rather than fixing it.
122
122
-**`custom-openai-account` is a phantom strategy.** It appears in `ReasoningCapability["strategy"]` but no branch of `getReasoningCapability` returns it, and no branch of `buildLangChainReasoningOptions` handles it. Left over from the removed ChatGPT provider.
123
123
-**`llm-provider-auth.ts` is misnamed.** It performs no authentication since the device flows were removed — it is purely model-list discovery. `model-discovery.ts` would say what it does.
124
124
-**MiniMax discovery spends the user's key.** Nine probe requests per discovery click, uncached, at `max_tokens: 1`. Cache per key if it ever moves to a hot path.
0 commit comments