Skip to main content
Ramp Router routes requests across model providers behind one OpenAI-compatible Responses endpoint. RampRouter connects Agno agents to it. Model ids are account-scoped: Router’s GET /v1/models lists what your key can use. Router’s rate limits, per-model service tiers, timeout maxima, and spend controls are set by Router and vary by model — see Router’s errors and limits and control spend pages rather than this one.

Installation

RampRouter uses the OpenAI Python SDK, which the agno[openai] extra provides.

Authentication

Set your RAMP_ROUTER_API_KEY environment variable. Get your key from the Router dashboard.

Example

Use RampRouter with your Agent:
The model string "ramp:gpt-5.6-luna" resolves to the same class. The spelling "ramprouter:" also resolves, but "ramp:" is the registered form.

Server-Side Fallback

models=[...] is Router’s server-side fallback: one to fifteen Router catalog ids (for example "openai:gpt-5-nano", optionally ":flex"-suffixed), tried in order on Router’s side. When models is set, Agno omits the single id from the request. This is distinct from Agno’s client-side fallback models, which retry against a different provider from your process.
allow_flex_tier is forwarded to Router with the request; Router accepts False on any model and rejects True with a 400 on models without Flex capacity. See Router’s request fields for the tier semantics.

Behavior Notes

  • Background mode is not supported: constructing RampRouter(background=True) raises ValueError.
  • Token counting is local. count_tokens and acount_tokens estimate from the messages in your process instead of calling the API.
  • A generation that runs out of max_output_tokens ends as an incomplete response; Agno reads the usage from it and logs that Router stopped the response early.

Parameters

RampRouter extends OpenResponses and accepts all of its parameters.