fix(auxiliary): retry named provider after custom endpoint fails for MiniMax - #22971
fix(auxiliary): retry named provider after custom endpoint fails for MiniMax#22971crayfish-ai wants to merge 2 commits into
Conversation
Step 1 of _resolve_auto() routes 'custom' + base_url to resolve_provider_client with provider='custom', which uses OPENAI_API_KEY and fails when that is empty. When the user's actual main provider is a named provider (e.g. 'minimax'), retry with the named provider after the custom endpoint fails — it may have its own key (e.g. MINIMAX_API_KEY) even though the custom endpoint did not respond. Also fix the warning message that incorrectly suggested setting OPENROUTER_API_KEY or a local model, rather than the correct fix: auxiliary.<task>.provider: main.
9142759 to
3e7d9d6
Compare
Status Note (2026-05-13)This PR was closed on 2026-05-11 at 11:19 UTC but shows merged: false — the two commits were never actually merged into any upstream branch:
Verification:
Both fixes are still needed by PR #22944 (context compression). If the maintainers intend to close this PR without merging, the fixes should be cherry-picked onto the server-mainline branch instead. |
Status Note (2026-05-13)This PR was closed on 2026-05-11 at 11:19 UTC but shows merged: false — the two commits were never actually merged into any upstream branch:
Verification:
Both fixes are still needed by PR #22944 (context compression). If the maintainers intend to close this PR without merging, the fixes should be cherry-picked onto the server-mainline branch instead. |
Status Note (2026-05-13)This PR was closed on 2026-05-11 at 11:19 UTC but shows merged: false — the two commits were never actually merged into any upstream branch:
Verification:
Both fixes are still needed by PR #22944 (context compression). If the maintainers intend to close this PR without merging, the fixes should be cherry-picked onto the server-mainline branch instead. |
Problem
When config.yaml has (or pointing to a custom endpoint) as the main provider, auxiliary auto-detect in Step 1 calls , which tries . If that is empty, Step 1 fails — even when the user's actual named provider (e.g. 'minimax') is configured with .
This causes context compression, summarization, and memory flush to silently fail with:
Fix
Retry named provider after custom endpoint fails: In Step 1, after the branch returns None, retry using the actual named (e.g. 'minimax'). The named provider has its own key () even if the custom endpoint did not respond.
Fix misleading warning message: The warning incorrectly suggests or local model, when the correct fix is .
Testing