Skip to content

fix: preserve OpenRouter request parameters - #10

Open
ElliotEtag wants to merge 1 commit into
mainfrom
codex/fix-openrouter-request-parity
Open

fix: preserve OpenRouter request parameters#10
ElliotEtag wants to merge 1 commit into
mainfrom
codex/fix-openrouter-request-parity

Conversation

@ElliotEtag

@ElliotEtag ElliotEtag commented Aug 21, 2026

Copy link
Copy Markdown

Why

Pollinations sends OpenRouter traffic through the generic OpenAI custom-host adapter. It preserves fields but drops OpenRouter's provider routing object. The native adapter preserves routing but drops fields such as stop. Live probes reproduced both failures: the generic adapter ignored an impossible provider.only allowlist; the native adapter enforced it but ignored stop.

Production evidence

Tinybird production, 2026-08-21:

  • Seven-day all-zero usage: gemini-fast 3,734/645,788 successes (142 fully missing), gemini 388/3,406 (166 missing), and gemini-flash-lite-3.5 43/4,250.
  • The rolling-hour symptom was limited to those three pinned Gemini routes; non-Gemini OpenRouter routes had only isolated seven-day events: Mistral 12, Llama Scout 2, Mercury 2.

All three should pin Vertex, but the generic adapter removes that pin. Gemini Fast has most volume; the symptom is Gemini-family-wide.

Fix and long-term result

This establishes one provider-aware adapter. Pollinations can then switch every OpenRouter route at the shared factory without per-model patches or post-request recovery. This PR does not deploy or switch traffic.

Checks

  • Focused tests, build, and local startup pass; repository-wide checks retain unrelated main failures.

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