Motivation
Candidates currently have to exist in OpenRouter's catalog. Teams also use Azure OpenAI deployments, local models (Ollama, vLLM) and fine-tunes, which can't be routed to today. The router also can't start at all if OpenRouter's model list is unreachable.
Proposal
Let models accept ModelInfo objects as well as id strings:
Router(jev_api_key=k, models=[
"openai/gpt-6-luna",
ModelInfo("local/llama-4-8b", context_length=128_000, max_output_tokens=8_000,
prompt_price=0.0, completion_price=0.0, description="Local, private, slow"),
])
Only fetch the catalog when at least one id string needs looking up.
Done when
Motivation
Candidates currently have to exist in OpenRouter's catalog. Teams also use Azure OpenAI deployments, local models (Ollama, vLLM) and fine-tunes, which can't be routed to today. The router also can't start at all if OpenRouter's model list is unreachable.
Proposal
Let
modelsacceptModelInfoobjects as well as id strings:Only fetch the catalog when at least one id string needs looking up.
Done when
ModelInfoobjects never touches the network untilroute()