feat(model-routing): add openai models, full claude catalog, passthrough routing#35
feat(model-routing): add openai models, full claude catalog, passthrough routing#35RustMunkey merged 2 commits intomainfrom
Conversation
ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds OpenAI model support: expands the model catalog and provider inference, introduces OpenAIRunner and OpenAI API key config, updates runtime routing to dispatch by model-prefix (Ollama/OpenAI/Anthropic), and adjusts multipliers, passthrough, and model-resolution logic. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant Router as Runtime Router
participant Config as Settings
participant OAI as OpenAI API
participant OAIRunner as OpenAI Runner
participant Anthropic as Anthropic API
participant Ollama as Ollama Runner
User->>Router: request(model_id, input)
Router->>Router: infer provider from model_id
alt provider == openai
Router->>Config: read openai_api_key
Config-->>Router: api_key
Router->>OAIRunner: instantiate(model_id, api_key)
Router->>OAIRunner: run(input)
OAIRunner->>OAI: create_chat_completion(messages)
OAI-->>OAIRunner: response (tokens, finish_reason)
OAIRunner-->>Router: RunResult(output, tokens, turns)
else provider == anthropic
Router->>Anthropic: forward request
else provider == ollama
Router->>Ollama: forward request
else
Router-->>User: RuntimeError (unknown provider / missing key)
end
Router-->>User: response + billing metadata
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
📝 Coding Plan
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
…hrough multiplier test
Summary by CodeRabbit
New Features
Bug Fixes