-
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 5 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.
The new handoff still passes the wrong provider shape into the actual post-turn extraction. Here,
🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.byokProvideris theByokChatProviderConfigfrom the chat request, whose discriminator isprotocol;pickProvider()only enters its BYOK branch whenchatProvider.providerexists and is a key inPROVIDER_DEFAULTS. Consequently a MiniMax/OpenAI-compatible run reaches this line with{ protocol: 'openai', ... }, the snapshot is ignored, and extraction can still fall through to the legacy OpenAI/default path and selectgpt-4o-mini—the production failure this PR is intended to fix. Please normalize the request contract before passing it, for example to{ provider: byokProvider.protocol, apiKey: byokProvider.apiKey, baseUrl: byokProvider.baseUrl, apiVersion: byokProvider.apiVersion, model: byokProvider.model ?? safeModel }, or updatepickProvider()to consumeByokChatProviderConfigconsistently. Please also add a close-handler/provider-selection regression test that proves an OpenAI-compatible custom base URL selects the supplied endpoint and model; the current focused tests pass because none exercises this new handoff.