Skip to content

Commit 2fca516

Browse files
committed
feat: add model pattern configuration for ALL providers
This commit extends model pattern configuration to ALL providers, not just the newly added ones. **Template changes (ai-gateway.sh):** All providers now support custom model patterns via environment variables: - DASHSCOPE_MODELS (default: qwen) - DEEPSEEK_MODELS (default: deepseek) - MOONSHOT_MODELS (default: moonshot-.*|kimi-.*) - ZHIPUAI_MODELS (default: GLM-) - MINIMAX_MODELS (default: abab) - AZURE_MODELS (default: gpt-.*|o1-.*|o3-.*) - OPENAI_MODELS (default: gpt-.*|o1-.*|o3-.*) - YI_MODELS (default: yi-) - AI360_MODELS (default: 360GPT) - BAICHUAN_MODELS (default: Baichuan) - BAIDU_MODELS (default: ERNIE-) - CLAUDE_MODELS (default: claude-) - COHERE_MODELS (default: command|command-.*) - DOUBAO_MODELS (default: doubao-) - GEMINI_MODELS (default: gemini-) - MISTRAL_MODELS (default: open-mistral-.*|mistral-.*) - OLLAMA_MODELS (default: codellama.*|llama.*) - STEPFUN_MODELS (default: step-) - (Plus all previously added providers) **CLI parameter support:** Added corresponding --xxx-models parameters for all providers: --dashscope-models, --deepseek-models, --moonshot-models, --zhipuai-models, --minimax-models, --azure-models, --openai-models, --yi-models, --ai360-models, --baichuan-models, --baidu-models, --claude-models, --cohere-models, --doubao-models, --gemini-models, --mistral-models, --ollama-models, --stepfun-models **Interactive configuration functions:** Added/updated configuration functions for all providers: - configureDashscopeProvider() - configureDeepSeekProvider() - configureMoonshotProvider() - configureZhipuAIProvider() - configureOpenAIProvider() - configureYiProvider() - configureAI360Provider() - configureBaichuanProvider() - configureBaiduProvider() - configureCohereProvider() - configureDoubaoProvider() - configureGeminiProvider() - configureMistralProvider() - configureStepfunProvider() Updated existing functions with model pattern support: - configureAzureProvider() - configureMinimaxProvider() - configureClaudeProvider() - configureOllamaProvider() Each function now prompts for model patterns with sensible defaults matching the template configuration. **Usage examples:** ```bash # Customize models for standard providers ./get-ai-gateway.sh start \ --openai-key="$KEY" --openai-models="gpt-4.*" \ --dashscope-key="$KEY" --dashscope-models="qwen-.*" # Mix and match providers by model ./get-ai-gateway.sh start \ --deepseek-key="$KEY" --deepseek-models="deepseek-coder.*" \ --moonshot-key="$KEY" --moonshot-models="kimi.*" ``` Now EVERY provider supports custom model pattern configuration, enabling fine-grained control over model routing.
1 parent 0424be5 commit 2fca516

2 files changed

Lines changed: 384 additions & 33 deletions

File tree

0 commit comments

Comments
 (0)