@thxp/llms 3.2.6 → 3.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -21,7 +21,7 @@
21
21
 
22
22
  ## ✨ Features
23
23
 
24
- - **Model Routing**: Route requests to different models based on your needs (e.g., background tasks, thinking, long context).
24
+ - **Model Routing**: Route requests to different models based on your needs (e.g., background, thinking, web search).
25
25
  - **Multi-Provider Support**: Supports various model providers like OpenRouter, DeepSeek, Ollama, Gemini, Volcengine, and SiliconFlow.
26
26
  - **Request/Response Transformation**: Customize requests and responses for different providers using transformers.
27
27
  - **Dynamic Model Switching**: Switch models on-the-fly within Claude Code using the `/model` command.
@@ -437,17 +437,17 @@ You can also create your own transformers and load them via the `transformers` f
437
437
 
438
438
  #### Router
439
439
 
440
- The `Router` object defines which model to use for different scenarios:
440
+ The `Router` object defines which model to use for different scenarios. All requests start with the `default` model, and are overridden when specific conditions are met:
441
441
 
442
- - `default`: The default model for general tasks.
443
- - `background`: A model for background tasks. This can be a smaller, local model to save costs.
444
- - `think`: A model for reasoning-heavy tasks, like Plan Mode.
445
- - `webSearch`: Used for handling web search tasks and this requires the model itself to support the feature. If you're using openrouter, you need to add the `:online` suffix after the model name.
446
- - `image` (beta): Used for handling image-related tasks (supported by CCR’s built-in agent). If the model does not support tool calling, you need to set the `config.forceUseImageAgent` property to `true`.
442
+ - `default`: The default model for all requests (array supported for fallback chain).
443
+ - `background`: Overrides for Haiku model requests only (model name contains "claude" and "haiku"). Useful for routing lightweight Haiku tasks to a cheaper model.
444
+ - `think`: Overrides when thinking is explicitly enabled (thinking: true or type: "enabled"). Adaptive thinking does not trigger this route.
445
+ - `webSearch`: Overrides when actual web search tool calls are detected in the conversation history (not just because the WebSearch tool is available).
446
+ - `image` (beta): Overrides for image-related tasks (requires model to support tool calling; set config.forceUseImageAgent to true if not).
447
447
 
448
448
  - You can also switch models dynamically in Claude Code with the `/model` command:
449
449
  `/model provider_name,model_name`
450
- Example: `/model openrouter,anthropic/claude-3.5-sonnet`
450
+ Example: `/model openrouter,anthropic/claude-3.5-sonnet`
451
451
 
452
452
  #### Custom Router
453
453