Skip to main content
RouteHub uses litellm’s function names and module paths, so most code only changes its imports. The tables below cover what doesn’t carry over.

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_fn and any litellm_* 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_tokens as max_completion_tokens, which every current OpenAI chat model accepts and reasoning models require.
  • There is no Router, no callbacks, no proxy server and no completion_cost. For cost, multiply response.usage token counts by the prices from get_model_info. See Compute the cost of a call.
  • get_model_info, model_cost and model_list come from OpenRouter’s live model list, not a bundled price file. Unknown models raise ModelNotMappedError; add them with register_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/: