mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
fixed the config generator to allow for base_url providers LLMs to include wildcard models
This commit is contained in:
parent
a7f7a011b3
commit
6b86830c09
4 changed files with 23 additions and 34 deletions
|
|
@ -248,7 +248,21 @@ def validate_and_render_schema():
|
|||
f"Must provide base_url and provider_interface for unsupported provider {provider} for model {model_name}. Supported providers are: {', '.join(SUPPORTED_PROVIDERS)}"
|
||||
)
|
||||
provider = model_provider.get("provider_interface", None)
|
||||
elif model_provider.get("provider_interface", None) is not None:
|
||||
elif is_wildcard and provider not in SUPPORTED_PROVIDERS:
|
||||
# Wildcard models with unsupported providers require base_url and provider_interface
|
||||
if (
|
||||
model_provider.get("base_url", None) is None
|
||||
or model_provider.get("provider_interface", None) is None
|
||||
):
|
||||
raise Exception(
|
||||
f"Must provide base_url and provider_interface for unsupported provider {provider} for wildcard model {model_name}. Supported providers are: {', '.join(SUPPORTED_PROVIDERS)}"
|
||||
)
|
||||
provider = model_provider.get("provider_interface", None)
|
||||
elif (
|
||||
provider in SUPPORTED_PROVIDERS
|
||||
and model_provider.get("provider_interface", None) is not None
|
||||
):
|
||||
# For supported providers, provider_interface should not be manually set
|
||||
raise Exception(
|
||||
f"Please provide provider interface as part of model name {model_name} using the format <provider>/<model_id>. For example, use 'openai/gpt-3.5-turbo' instead of 'gpt-3.5-turbo' "
|
||||
)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ nodaemon=true
|
|||
[program:brightstaff]
|
||||
command=sh -c "\
|
||||
envsubst < /app/arch_config_rendered.yaml > /app/arch_config_rendered.env_sub.yaml && \
|
||||
RUST_LOG=debug \
|
||||
RUST_LOG=info \
|
||||
ARCH_CONFIG_PATH_RENDERED=/app/arch_config_rendered.env_sub.yaml \
|
||||
/app/brightstaff 2>&1 | \
|
||||
tee /var/log/brightstaff.log | \
|
||||
|
|
|
|||
|
|
@ -23,7 +23,13 @@ llm_providers:
|
|||
- model: openai/gpt-4o
|
||||
access_key: $OPENAI_API_KEY
|
||||
|
||||
# Anthropic Models
|
||||
- model: openai/*
|
||||
access_key: $OPENAI_API_KEY
|
||||
|
||||
# Anthropic - support all Claude models
|
||||
- model: anthropic/*
|
||||
access_key: $ANTHROPIC_API_KEY
|
||||
|
||||
- model: anthropic/claude-sonnet-4-20250514
|
||||
access_key: $ANTHROPIC_API_KEY
|
||||
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
version: v0.3.0
|
||||
|
||||
listeners:
|
||||
# Model listener for direct LLM access
|
||||
- type: model
|
||||
name: llms
|
||||
address: 0.0.0.0
|
||||
port: 12000
|
||||
|
||||
model_providers:
|
||||
# OpenAI - support all models via wildcard
|
||||
- model: openai/*
|
||||
access_key: $OPENAI_API_KEY
|
||||
|
||||
# Anthropic - support all Claude models
|
||||
- model: anthropic/*
|
||||
access_key: $ANTHROPIC_API_KEY
|
||||
|
||||
- model: anthropic/claude-sonnet-4-20250514
|
||||
access_key: $ANTHROPIC_API_KEY
|
||||
routing_preferences:
|
||||
- name: code generation
|
||||
description: generating new code snippets, functions, or boilerplate based on user prompts or requirements
|
||||
|
||||
- model: xai/*
|
||||
access_key: $GROK_API_KEY
|
||||
|
||||
# Custom internal LLM provider
|
||||
# Note: Requires base_url and provider_interface for unknown providers
|
||||
- model: ollama/*
|
||||
base_url: https://llm.internal.company.com
|
||||
Loading…
Add table
Add a link
Reference in a new issue