From 12409a105c045fec8b914657578e2c93c191641c Mon Sep 17 00:00:00 2001 From: Lakshman Patel Date: Fri, 31 Jul 2026 19:39:39 +0530 Subject: [PATCH] feat(llm): extend Gateway and Model contracts with region options and thinking defaults --- llm/provider.go | 45 +++++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/llm/provider.go b/llm/provider.go index 1031ad8..a3f671c 100644 --- a/llm/provider.go +++ b/llm/provider.go @@ -172,6 +172,14 @@ type Model struct { Capabilities []string `json:"capabilities,omitempty"` Source string `json:"source,omitempty"` LiveMetadata json.RawMessage `json:"live_metadata,omitempty"` + + // SupportsThinkingToggle indicates this model's provider wire protocol + // honors the ThinkingEnabled toggle. Populated by the engine catalog. + SupportsThinkingToggle bool `json:"supports_thinking_toggle,omitempty"` + // DefaultThinkingEnabled is the provider-default thinking state for this + // model when no explicit user preference is set. nil means no provider + // default (fall through to global settings). + DefaultThinkingEnabled *bool `json:"default_thinking_enabled,omitempty"` } // ModelClass is a provider-neutral relative model cost/capability band. @@ -276,22 +284,31 @@ type GatewayInspector interface { RoutingPreview(ctx context.Context, modelID string) (string, error) } +// GatewayRegionOption describes one selectable region for a regional gateway. +type GatewayRegionOption struct { + Value string `json:"value"` + DisplayName string `json:"display_name"` + Endpoint string `json:"endpoint,omitempty"` +} + // Gateway is a provider/gateway descriptor. type Gateway struct { - ID string `json:"id"` - DisplayName string `json:"display_name"` - DeploymentID string `json:"deployment_id,omitempty"` - CredentialEnv string `json:"credential_env"` - RequiresKey bool `json:"requires_key"` - SortOrder int `json:"sort_order"` - ChatPreference int `json:"chat_preference"` - SupportsLiveDiscovery bool `json:"supports_live_discovery"` - CredentialConfigured bool `json:"credential_configured"` - DeploymentConfigured bool `json:"deployment_configured"` - ModelCount int `json:"model_count"` - RegionLabel string `json:"region_label,omitempty"` - RegionRequired bool `json:"region_required"` - Active bool `json:"active"` + ID string `json:"id"` + DisplayName string `json:"display_name"` + DeploymentID string `json:"deployment_id,omitempty"` + CredentialEnv string `json:"credential_env"` + RequiresKey bool `json:"requires_key"` + SortOrder int `json:"sort_order"` + ChatPreference int `json:"chat_preference"` + SupportsLiveDiscovery bool `json:"supports_live_discovery"` + CredentialConfigured bool `json:"credential_configured"` + DeploymentConfigured bool `json:"deployment_configured"` + ModelCount int `json:"model_count"` + RegionLabel string `json:"region_label,omitempty"` + RegionRequired bool `json:"region_required"` + RegionOptions []GatewayRegionOption `json:"region_options,omitempty"` + DNSHost string `json:"dns_host,omitempty"` + Active bool `json:"active"` } // DeploymentSummary summarizes deployment routing for a model (host-facing).