mirror of
https://github.com/katanemo/plano.git
synced 2026-04-30 11:26:27 +02:00
fixing a bug where by we were writing the cluster_name for an upstream LLM more than once (#607)
Co-authored-by: Salman Paracha <salmanparacha@MacBook-Pro-288.local>
This commit is contained in:
parent
f26bb05d35
commit
5108013df4
2 changed files with 12 additions and 2 deletions
|
|
@ -143,6 +143,7 @@ def validate_and_render_schema():
|
||||||
arch_tracing = config_yaml.get("tracing", {})
|
arch_tracing = config_yaml.get("tracing", {})
|
||||||
|
|
||||||
llms_with_endpoint = []
|
llms_with_endpoint = []
|
||||||
|
llms_with_endpoint_cluster_names = set()
|
||||||
updated_model_providers = []
|
updated_model_providers = []
|
||||||
model_provider_name_set = set()
|
model_provider_name_set = set()
|
||||||
llms_with_usage = []
|
llms_with_usage = []
|
||||||
|
|
@ -267,10 +268,14 @@ def validate_and_render_schema():
|
||||||
model_provider["endpoint"] = endpoint
|
model_provider["endpoint"] = endpoint
|
||||||
model_provider["port"] = port
|
model_provider["port"] = port
|
||||||
model_provider["protocol"] = protocol
|
model_provider["protocol"] = protocol
|
||||||
model_provider["cluster_name"] = (
|
cluster_name = (
|
||||||
provider + "_" + endpoint
|
provider + "_" + endpoint
|
||||||
) # make name unique by appending endpoint
|
) # make name unique by appending endpoint
|
||||||
|
model_provider["cluster_name"] = cluster_name
|
||||||
|
# Only add if cluster_name is not already present to avoid duplicates
|
||||||
|
if cluster_name not in llms_with_endpoint_cluster_names:
|
||||||
llms_with_endpoint.append(model_provider)
|
llms_with_endpoint.append(model_provider)
|
||||||
|
llms_with_endpoint_cluster_names.add(cluster_name)
|
||||||
|
|
||||||
if len(model_usage_name_keys) > 0:
|
if len(model_usage_name_keys) > 0:
|
||||||
routing_model_provider = config_yaml.get("routing", {}).get(
|
routing_model_provider = config_yaml.get("routing", {}).get(
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,11 @@ llm_providers:
|
||||||
access_key: $AWS_BEARER_TOKEN_BEDROCK
|
access_key: $AWS_BEARER_TOKEN_BEDROCK
|
||||||
base_url: https://bedrock-runtime.us-west-2.amazonaws.com
|
base_url: https://bedrock-runtime.us-west-2.amazonaws.com
|
||||||
|
|
||||||
|
- model: amazon_bedrock/us.amazon.nova-pro-v1:0
|
||||||
|
access_key: $AWS_BEARER_TOKEN_BEDROCK
|
||||||
|
base_url: https://bedrock-runtime.us-west-2.amazonaws.com
|
||||||
|
|
||||||
|
|
||||||
# Ollama Models
|
# Ollama Models
|
||||||
- model: ollama/llama3.1
|
- model: ollama/llama3.1
|
||||||
base_url: http://host.docker.internal:11434
|
base_url: http://host.docker.internal:11434
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue