-
Notifications
You must be signed in to change notification settings - Fork 9.7k
fix(memory): forward BYOK chat model through /api/memory/extract #5177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d180a1b
b3aebe8
a62c6eb
988b652
0951009
8e0d6a1
ca7b152
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1239,6 +1239,7 @@ function byokOpenCodeProviderFromConfig( | |
| protocol: config.apiProtocol, | ||
| apiKey: config.apiKey.trim(), | ||
| baseUrl: config.baseUrl, | ||
| model: config.model, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This field fixes the runtime wiring, but it also changes the BYOK provider payload shape that the web run-isolation tests lock down. The live |
||
| ...(selectedProvider?.requiresApiKey === false ? { requiresApiKey: false } : {}), | ||
| apiVersion: | ||
| config.apiProtocol === 'azure' | ||
|
|
@@ -5894,6 +5895,7 @@ export function ProjectView({ | |
| apiKey: byokOpenCodeProvider.apiKey, | ||
| baseUrl: byokOpenCodeProvider.baseUrl, | ||
| apiVersion: byokOpenCodeProvider.apiVersion, | ||
| model: byokOpenCodeProvider.model, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This new field currently breaks the web typecheck because
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This still does not actually send the selected BYOK chat model. The added field reads
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This now copies the selected model into the BYOK snapshot, but this snapshot still appears to be attached only to the pre-turn That means the model value added here does not seem to reach the post-turn
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This now includes the selected BYOK model in the Please either send a post-turn |
||
| } | ||
| : undefined; | ||
| if (userText.length > 0) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please preserve the keyless-provider policy in this normalization.
🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.byokProvidermay legitimately carryrequiresApiKey: false—the existing daemon chat-route coverage uses exactly that shape for a local OpenAI-compatible endpoint—but this new object copies only protocol, key, URL, API version, and model. Downstream,pickProvider()enters the chat-BYOK branch only whenapiKeyis non-empty, so a successful keyless vLLM or local Ollama chat skips its supplied endpoint/model during post-turn extraction and can fall through to unrelated environment or media-config credentials (including thegpt-4o-minidefault this PR is avoiding). Please threadrequiresApiKeythrough, allow the BYOK branch when it is explicitly false, and omit the Authorization header when no key is required. A regression test should exercise a post-turn provider snapshot with an empty key,requiresApiKey: false, a local base URL, and a selected model, then assert that extraction calls that URL/model rather than a fallback.