add support for custom llm with ssl support

Add support for using custom llm that are served through https protocol.
This commit is contained in:
Adil Hafeez 2025-01-24 12:40:45 -08:00
parent 1e75c1c5e0
commit 12e4d8d8b8
3 changed files with 24 additions and 0 deletions

View file

@ -61,6 +61,11 @@ properties:
type: boolean
endpoint:
type: string
protocol:
type: string
enum:
- http
- https
additionalProperties: false
required:
- name

View file

@ -567,6 +567,18 @@ static_resources:
address: {{ local_llm_provider.endpoint }}
port_value: {{ local_llm_provider.port }}
hostname: {{ local_llm_provider.endpoint }}
{% if local_llm_provider.protocol == "https" %}
transport_socket:
name: envoy.transport_sockets.tls
typed_config:
"@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext
sni: {{ local_llm_provider.endpoint }}
common_tls_context:
tls_params:
tls_minimum_protocol_version: TLSv1_2
tls_maximum_protocol_version: TLSv1_3
{% endif %}
{% endfor %}
- name: arch_internal
connect_timeout: 5s