Skip to content

fix(model-routing): remove "api error" from routing-failure patterns#36

Merged
mkonopelski-gd merged 1 commit into
mainfrom
worktree-fix+remove-api-error-pattern
Jul 13, 2026
Merged

fix(model-routing): remove "api error" from routing-failure patterns#36
mkonopelski-gd merged 1 commit into
mainfrom
worktree-fix+remove-api-error-pattern

Conversation

@mkonopelski-gd

Copy link
Copy Markdown
Contributor

Summary

  • Removes the overbroad "api error" entry from _MODEL_ROUTING_FAILURE_PATTERNS in backend/app/services/model_routing.py — it matched any API Error message regardless of cause, including genuine HTTP errors, and is superseded by the more specific "malformed response" / "empty response" fragments.
  • Updates backend/test/test_classify_error.py to reflect the new contract: a bare "api error" message no longer classifies as MODEL_ROUTING_FAILURE.

Test plan

  • make unit-tests passes (backend + mcp_server)

…atterns

"api error" matched any API Error message regardless of cause, including
genuine HTTP errors. Keep "malformed response" / "empty response" as the
specific fragments for the OpenRouter malformed-200 failure mode.
@mkonopelski-gd mkonopelski-gd merged commit 7177ee3 into main Jul 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants