mirror of
https://github.com/katanemo/plano.git
synced 2026-07-14 16:22:12 +02:00
fix
This commit is contained in:
parent
586c860bce
commit
c3f9824032
8 changed files with 164 additions and 5 deletions
|
|
@ -33,6 +33,8 @@ properties:
|
|||
enum:
|
||||
- http
|
||||
- https
|
||||
http_host:
|
||||
type: string
|
||||
additionalProperties: false
|
||||
required:
|
||||
- endpoint
|
||||
|
|
|
|||
|
|
@ -486,14 +486,14 @@ static_resources:
|
|||
typed_config:
|
||||
"@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext
|
||||
sni: api.mistral.ai
|
||||
{% for internal_clustrer in ["arch_fc", "model_server"] %}
|
||||
- name: {{ internal_clustrer }}
|
||||
{% for internal_cluster in ["arch_fc", "model_server"] %}
|
||||
- name: {{ internal_cluster }}
|
||||
connect_timeout: 5s
|
||||
type: STRICT_DNS
|
||||
dns_lookup_family: V4_ONLY
|
||||
lb_policy: ROUND_ROBIN
|
||||
load_assignment:
|
||||
cluster_name: {{ internal_clustrer }}
|
||||
cluster_name: {{ internal_cluster }}
|
||||
endpoints:
|
||||
- lb_endpoints:
|
||||
- endpoint:
|
||||
|
|
@ -501,7 +501,7 @@ static_resources:
|
|||
socket_address:
|
||||
address: host.docker.internal
|
||||
port_value: $MODEL_SERVER_PORT
|
||||
hostname: {{ internal_clustrer }}
|
||||
hostname: {{ internal_cluster }}
|
||||
{% endfor %}
|
||||
- name: mistral_7b_instruct
|
||||
connect_timeout: 5s
|
||||
|
|
@ -537,7 +537,11 @@ static_resources:
|
|||
socket_address:
|
||||
address: {{ cluster.endpoint }}
|
||||
port_value: {{ cluster.port }}
|
||||
{% if cluster.http_host %}
|
||||
hostname: {{ cluster.http_host }}
|
||||
{% else %}
|
||||
hostname: {{ cluster.endpoint }}
|
||||
{% endif %}
|
||||
{% if cluster.protocol == "https" %}
|
||||
transport_socket:
|
||||
name: envoy.transport_sockets.tls
|
||||
|
|
|
|||
|
|
@ -89,6 +89,18 @@ def get_llm_provider_access_keys(arch_config_file):
|
|||
if acess_key is not None:
|
||||
access_key_list.append(acess_key)
|
||||
|
||||
for prompt_target in arch_config_yaml.get("prompt_targets", []):
|
||||
for k, v in prompt_target.get("endpoint", {}).get("http_headers", {}).items():
|
||||
if k.lower() == "authorization":
|
||||
print(
|
||||
f"found auth header: {k} for prompt_target: {prompt_target.get('name')}/{prompt_target.get('endpoint').get('name')}"
|
||||
)
|
||||
auth_tokens = v.split(" ")
|
||||
if len(auth_tokens) > 1:
|
||||
access_key_list.append(auth_tokens[1])
|
||||
else:
|
||||
access_key_list.append(v)
|
||||
|
||||
return access_key_list
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue