Skip to content

[skills] ai-gateway: prefer default routing over provider restrictions - #373

Merged
harpreetarora merged 1 commit into
mainfrom
ai-gateway/default-routing-first
Nov 2, 2026
Merged

harpreetarora merged 1 commit into
mainfrom
ai-gateway/default-routing-first

Conversation

@harpreetarora

Copy link
Copy Markdown
Contributor

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, and sort together, 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 that only "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 via has, service tier, session affinity, team allowlist, preference) to the control that keeps every qualifying provider eligible, and describe when only fits. The example now shows order alone. 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: passed
  • bun test: 1279 pass, 0 fail
  • bun run build:from-skills:check: 0 stale

@harpreetarora
harpreetarora marked this pull request as ready for review November 2, 2026 21:13
@vercel
vercel Bot requested a review from a team November 2, 2026 21:13
@harpreetarora
harpreetarora enabled auto-merge (squash) November 2, 2026 21:13
@harpreetarora
harpreetarora merged commit adfd7e1 into main Nov 2, 2026
5 checks passed
@harpreetarora
harpreetarora deleted the ai-gateway/default-routing-first branch November 2, 2026 21:26
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