Skip to content

feat(routing): add weighted qwen3.5 overrides#2

Merged
coniferconcepts merged 2 commits intomainfrom
feature/per-model-routing-v2-weighted
Mar 14, 2026
Merged

feat(routing): add weighted qwen3.5 overrides#2
coniferconcepts merged 2 commits intomainfrom
feature/per-model-routing-v2-weighted

Conversation

@coniferconcepts
Copy link
Copy Markdown
Owner

@coniferconcepts coniferconcepts commented Mar 14, 2026

Summary

  • extend RoutingPolicy with a weighted strategy for weighted-router/<model> aliases while preserving the existing v1 single flow
  • add strict weighted overrides for qwen3.5 so selection stays on the ollama/chutes allowlist, explicitly excludes go, and rewrites to a concrete provider before provider lock-in
  • document the weighted override contract and add focused tests for validation, deterministic selection, passthrough compatibility, and dispatch-time rewriting

Testing

  • pytest tests/test_routing_policy.py tests/test_client_routing_policy.py
  • python3 -m py_compile "src/rotator_library/routing_policy.py" "src/rotator_library/client.py" "tests/test_routing_policy.py" "tests/test_client_routing_policy.py"
  • local smoke test: 1000 weighted selections produced ollama=788, chutes=212, go=0

Guardrails

  • weighted overrides require matching allowed_providers and weights
  • excluded_providers are validated at load time and surfaced in route logging
  • allow_global_fallback stays disabled for this v2 path, so unmatched or invalid weighted-router requests fail closed
  • existing retry, cooldown, and credential rotation behavior remains unchanged after the model rewrite

Follow-Up

  • if we want broader weighted routing later, we can add more model-specific overrides without changing the post-rewrite retry flow

@coniferconcepts coniferconcepts merged commit 28a30dc into main Mar 14, 2026
2 of 3 checks passed
@coniferconcepts coniferconcepts deleted the feature/per-model-routing-v2-weighted branch March 14, 2026 15:35
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.

1 participant