Repository navigation
[skills] ai-gateway: prefer default routing over provider restrictions - #373
Merged
Merged
Conversation
harpreetarora
marked this pull request as ready for review
November 2, 2026 21:13
harpreetarora
enabled auto-merge (squash)
November 2, 2026 21:13
Melkeydev
approved these changes
Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Teach agents to leave AI Gateway's default provider routing alone unless the user states a requirement, and to reach for requirement-based controls before
only.Why
The routing reference showed one snippet that sets
order,only, andsorttogether, and the SKILL.md invariant listed them neutrally. Agents copy that snippet, which adds a hard provider filter and drops cross-provider failover even when nothing called for it. The AI Gateway uptime docs already note thatonly"limits how AI Gateway can fall back."Approach
references/routing.md: lead with what default routing does, state the tradeoff of each option in neutral terms, map common requirements (ZDR, no training, region, capabilities viahas, service tier, session affinity, team allowlist, preference) to the control that keeps every qualifying provider eligible, and describe whenonlyfits. The example now showsorderalone. Agents still add any option the user asks for; the text tells them not to refuse.SKILL.md: rewrite the one routing invariant in place (+71 bytes, file stays under the 18 KB injection budget).Validation
bun run validate: passedbun test: 1279 pass, 0 failbun run build:from-skills:check: 0 stale