feat(ai): add OpenRouterClient implementing LlmClient
OpenAI-compatible client for OpenRouter. Translates canonical wire shapes at the boundary: tool-call arguments stringify on send / parse on receive (accepting both string and native-object forms); images rewritten from the base64 images field into content-parts with image_url entries; role=tool messages inherit tool_call_id from the preceding assistant's tool calls. /models parsed into ModelCapabilities via supported_parameters (tool use) and architecture.input_modalities (vision). 15-minute capabilities cache. Bearer auth; HTTP-Referer / X-Title attribution headers optional. Not wired into request routing yet — first consumer arrives with hybrid backend mode. 11 unit tests cover the translation helpers. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@ pub mod handlers;
|
||||
pub mod insight_generator;
|
||||
pub mod llm_client;
|
||||
pub mod ollama;
|
||||
pub mod openrouter;
|
||||
pub mod sms_client;
|
||||
|
||||
// strip_summary_boilerplate is used by binaries (test_daily_summary), not the library
|
||||
|
||||
Reference in New Issue
Block a user