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:
@@ -9,10 +9,12 @@ standardization purposes.
|
||||
Environment Variables:
|
||||
- OPENAI_ALLOWED_MODELS: Comma-separated list of allowed OpenAI models
|
||||
- GOOGLE_ALLOWED_MODELS: Comma-separated list of allowed Gemini models
|
||||
- OPENROUTER_ALLOWED_MODELS: Comma-separated list of allowed OpenRouter models
|
||||
|
||||
Example:
|
||||
OPENAI_ALLOWED_MODELS=o3-mini,o4-mini
|
||||
GOOGLE_ALLOWED_MODELS=flash
|
||||
OPENROUTER_ALLOWED_MODELS=opus,sonnet,mistral
|
||||
"""
|
||||
|
||||
import logging
|
||||
@@ -38,6 +40,7 @@ class ModelRestrictionService:
|
||||
ENV_VARS = {
|
||||
ProviderType.OPENAI: "OPENAI_ALLOWED_MODELS",
|
||||
ProviderType.GOOGLE: "GOOGLE_ALLOWED_MODELS",
|
||||
ProviderType.OPENROUTER: "OPENROUTER_ALLOWED_MODELS",
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
|
||||
Reference in New Issue
Block a user