Imports
Settings
RouteHub reads no module attributes, so
routehub.drop_params = True does nothing. To apply settings to every call, wrap the function once:
Objects
Responses are pydantic models. Use attribute access, or
response.model_dump() for a dict. Dictionary access raises TypeError.
Behaviour that differs
- litellm-only keyword arguments such as
metadata,caching,cache,fallbacks,retry_policy,logger_fnand anylitellm_*name are accepted and ignored. Fallbacks and response caching don’t happen, so handle them in your code. See Fall back to another model. - Any other unknown keyword argument is sent to the provider in the request body unless
drop_params=True. A misspelt argument isn’t caught locally. - Requests to OpenAI send
max_tokensasmax_completion_tokens, which every current OpenAI chat model accepts and reasoning models require. - There is no
Router, no callbacks, no proxy server and nocompletion_cost. For cost, multiplyresponse.usagetoken counts by the prices fromget_model_info. See Compute the cost of a call. get_model_info,model_costandmodel_listcome from OpenRouter’s live model list, not a bundled price file. Unknown models raiseModelNotMappedError; add them withregister_model.- Claude is called through Anthropic’s native Messages API, so
cache_control, extended thinking and cached-token usage work as they do on Anthropic.
Teach your coding agent
RouteHub ships an Agent Skill that shows coding agents how to call RouteHub correctly, including which litellm habits break. To install it for Claude Code, copy the folder into~/.claude/skills/ for every project, or into a project’s .claude/skills/: