Fix opencode-go custom provider overlap routing - #2204
1 commit merged into
Conversation
|
Reading the diff at The fix correctly widens the existing #1922 guardOld guard at master _skip_custom_providers = (
_is_explicit_non_custom_provider
and _default_model is not None
and model_id == _default_model
)That guard only fired when the requested model was the configured default. For #1894 the user's configured or model_id in _provider_models_setcloses that hole by saying "if the configured non-custom provider's static catalog owns the model id, skip custom_providers". For Behavior change is broader than #1894 — worth flagging in the descriptionThis same guard now fires for every (configured non-custom provider, model id in that provider's static catalog) pair. Concrete consequence: if a user has
This is probably correct — the configured provider is the user's explicit choice — and the escape hatch is A small efficiency nit
Test coverage is good but missing one case
What I'd add: a regression test for the case where NetI'd merge this once the PR description (and ideally CHANGELOG) reflects the broader behavior shift. The fix itself is the right resolver change for #1894. |
6aedb7e
Fix opencode-go custom provider overlap routing (Michaelyklam, closes nesquena#1894)
Fix opencode-go custom provider overlap routing (Michaelyklam, closes nesquena#1894)
stage-350: medium-risk batch — auth trilogy (nesquena#2191/2/3) + cancel-status nesquena#2151 with conflict resolution + nesquena#2178 ollama guard + nesquena#2204 provider precedence + nesquena#2203 activity animation
Fix opencode-go custom provider overlap routing (Michaelyklam, closes nesquena#1894)
stage-350: medium-risk batch — auth trilogy (nesquena#2191/2/3) + cancel-status nesquena#2151 with conflict resolution + nesquena#2178 ollama guard + nesquena#2204 provider precedence + nesquena#2203 activity animation
Summary
Verification
git diff --checkpython -m py_compile api/*.py server.pypytest -q tests/test_resolve_model_provider_free_suffix.pypytest -q tests/test_issue1894_provider_overlap.pypytest -q tests -k "resolve_model_provider or model_with_provider_context or issue1894"Closes #1894