Files
freeway/providers/google-ai.json
T
Aryan SinghandClaude Opus 5 cb985dcf9c Freeway: self-hosted OpenAI-compatible gateway for free-tier providers
One endpoint in front of every free LLM tier, with automatic failover and no
provider key ever leaving the box.

Providers are data, not code: adding one is a JSON file plus an env var, never
a TypeScript change. Ships 12 providers pre-written; `verify-provider --apply`
derives the live model list from your own key.

- core: registry, bucketed quota meter (rolling + UTC-calendar windows),
  key-pool store, 6-step model router with diagnostic rejection reasons
- gateway: node:http, failover that commits to a stream only after 200 headers,
  SSE passthrough with usage sniffing, virtual keys with admin/inference roles
- context engine: sqlite sessions and a 5-rung refit ladder, so a 128k thread
  keeps working when it fails over to an 8k model
- cache: exact (sha256, safe-by-default) + opt-in semantic (flat Float32Array)
- guard: inbound limits, quota forecasting, limit calibration from upstream
  headers, key health, secret/PII/injection scanning
- dashboard: one self-contained HTML file, live SSE request log, token usage
- sdk: zero-dep typed client, drop-in for the OpenAI SDK

Zero runtime dependencies. 326 tests, 27-check smoke suite against a scripted
mock upstream so routing is testable without spending quota.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-16 22:41:49 -05:00

21 lines
1.1 KiB
JSON

{
"$schema": "./_schema.json",
"id": "google-ai",
"label": "Google AI Studio",
"docs": "https://ai.google.dev/gemini-api/docs/openai",
"console": "https://aistudio.google.com/apikey",
"priority": 25,
"baseUrl": "https://generativelanguage.googleapis.com/v1beta/openai",
"auth": { "type": "bearer", "envKeys": ["GOOGLE_AI_API_KEY", "GEMINI_API_KEY"] },
"limits": { "rpm": 15, "rpd": 1500 },
"limitsSource": "docs",
"verifiedOn": "2026-08-16",
"modelsEndpoint": "/models",
"modelsPath": "data[].id",
"notes": "The only free tier with native multimodal input across text, image, audio and video in one call. IMPORTANT: the free tier is not available in the EU, UK or Switzerland. Limits shown are for Flash; Pro models are far tighter (~2 rpm).",
"models": [
{ "id": "gemini-2.5-flash", "label": "Gemini 2.5 Flash", "alias": ["fast", "vision"], "context": 1048576, "caps": ["chat", "tools", "json", "vision", "long-context"], "priority": 10 },
{ "id": "text-embedding-004", "label": "Text Embedding 004", "alias": ["embed"], "context": 2048, "caps": ["embed"], "priority": 20 }
]
}