Skip to content

fix(orcarouter_models): set User-Agent on remote model fetch - #105

Open
taoh88 wants to merge 1 commit into
Continuum-AI-Corp:mainfrom
taoh88:fix/orcarouter-models-user-agent
Open

taoh88 wants to merge 1 commit into
Continuum-AI-Corp:mainfrom
taoh88:fix/orcarouter-models-user-agent

Conversation

@taoh88

@taoh88 taoh88 commented Sep 14, 2026

Copy link
Copy Markdown

Orca-Code-Review — push 1

Severity Count
P0 0
P1 0
P2 0
P3 0

✅ no blocking findings

_fetch_remote hits orcarouter.ai/models without a User-Agent header. Many CDNs (Cloudflare, CloudFront default rulesets) silently 403 requests with no User-Agent, which makes the unreachable-models dashboard tile degrade to the static fallback for a full hour even when the remote is healthy and would return useful data.

Adds User-Agent: orcarouter-lite/{version} to the request headers. Two new tests verify both the User-Agent and Accept headers are present.

_fetch_remote sends requests to orcarouter.ai/models without a
User-Agent header. Many CDNs and WAFs (Cloudflare, AWS CloudFront
default rules) silently block or 403 requests with no User-Agent,
causing the unreachable-models tile to degrade to the static
fallback for a full TTL even when the remote is healthy.

Add a descriptive User-Agent header (orcarouter-lite/{version}) so
the request looks like a legitimate client rather than a bot.

@orcacode-review orcacode-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐳 OrcaCode Review

No findings — nothing to flag in this PR. Great work!

OrcaCode Review — Route Smarter. Ship Safer. Spend Less.
Engine-reported: 355 calls · 19.4M tokens · 98% cached

❤️ Share · Install OrcaCode Review

Free on GitHub — the review runs on your own OrcaRouter key. If it helped, a shout-out goes a long way.

Share: X · Reddit · LinkedIn
Follow: X · Discord · LinkedIn · OrcaRouter

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