Add encouraging message about powerful models to schema in case it's not on Opus 4 or above

OPENROUTER_ALLOWED_MODELS environment variable support to further limit the models to allow from within Claude. This will put a limit on top of even the ones listed in custom_models.json
This commit is contained in:
Fahad
2025-06-14 11:34:17 +04:00
parent 21037c2d81
commit e0a05b86f1
12 changed files with 218 additions and 17 deletions

View File

@@ -84,6 +84,9 @@ OPENAI_ALLOWED_MODELS=o4-mini,o3-mini
# Only allow specific Gemini models
GOOGLE_ALLOWED_MODELS=flash
# Only allow specific OpenRouter models
OPENROUTER_ALLOWED_MODELS=opus,sonnet,mistral
# Use shorthand names or full model names
OPENAI_ALLOWED_MODELS=mini,o3-mini # mini = o4-mini
```
@@ -99,17 +102,21 @@ OPENAI_ALLOWED_MODELS=mini,o3-mini # mini = o4-mini
# Cost control - only cheap models
OPENAI_ALLOWED_MODELS=o4-mini
GOOGLE_ALLOWED_MODELS=flash
OPENROUTER_ALLOWED_MODELS=haiku,sonnet
# Single model per provider
OPENAI_ALLOWED_MODELS=o4-mini
GOOGLE_ALLOWED_MODELS=pro
OPENROUTER_ALLOWED_MODELS=opus
```
**Notes:**
- Applies to all usage including auto mode
- Case-insensitive, whitespace tolerant
- Server warns about typos at startup
- Only affects native providers (not OpenRouter/Custom)
- `OPENAI_ALLOWED_MODELS` and `GOOGLE_ALLOWED_MODELS` only affect native providers
- `OPENROUTER_ALLOWED_MODELS` affects OpenRouter models accessed via custom provider (where `is_custom: false` in custom_models.json)
- Custom local models (`is_custom: true`) are not affected by any restrictions
## Thinking Modes

View File

@@ -84,7 +84,7 @@ isort .
## What Each Test Suite Covers
### Unit Tests (256 tests)
### Unit Tests
Test isolated components and functions:
- **Provider functionality**: Model initialization, API interactions, capability checks
- **Tool operations**: All MCP tools (chat, analyze, debug, etc.)
@@ -92,7 +92,7 @@ Test isolated components and functions:
- **File handling**: Path validation, token limits, deduplication
- **Auto mode**: Model selection logic and fallback behavior
### Simulator Tests (14 tests)
### Simulator Tests
Validate real-world usage scenarios by simulating actual Claude prompts:
- **Basic conversations**: Multi-turn chat functionality with real prompts
- **Cross-tool continuation**: Context preservation across different tools