diff --git a/cli/planoai/utils.py b/cli/planoai/utils.py index 171006f14..a4076660d 100644 --- a/cli/planoai/utils.py +++ b/cli/planoai/utils.py @@ -92,7 +92,7 @@ def convert_legacy_listeners( "type": "model_listener", "port": 12000, "address": "0.0.0.0", - "timeout": "30s", + "timeout": "300s", "model_providers": model_providers or [], } @@ -101,7 +101,7 @@ def convert_legacy_listeners( "type": "prompt_listener", "port": 10000, "address": "0.0.0.0", - "timeout": "30s", + "timeout": "300s", } # Handle None case diff --git a/config/envoy.template.yaml b/config/envoy.template.yaml index a780c3f1b..8e5b414b3 100644 --- a/config/envoy.template.yaml +++ b/config/envoy.template.yaml @@ -257,7 +257,7 @@ static_resources: route: auto_host_rewrite: true cluster: bright_staff - timeout: 300s + timeout: {{ prompt_gateway_listener.timeout | default('300s') }} {% for cluster_name, cluster in plano_clusters.items() %} - match: prefix: "/" @@ -268,7 +268,7 @@ static_resources: route: auto_host_rewrite: true cluster: {{ cluster_name }} - timeout: 300s + timeout: {{ prompt_gateway_listener.timeout | default('300s') }} {% endfor %} http_filters: - name: envoy.filters.http.router @@ -336,7 +336,7 @@ static_resources: auto_host_rewrite: true prefix_rewrite: "/agents/" cluster: bright_staff - timeout: {{ listener.timeout | default('30s') }} + timeout: {{ listener.timeout | default('300s') }} http_filters: - name: envoy.filters.http.compressor typed_config: @@ -517,12 +517,12 @@ static_resources: route: auto_host_rewrite: true cluster: {{ llm_cluster_name }} - timeout: 300s + timeout: {{ llm_gateway_listener.timeout }} {% if llm_gateway_listener.max_retries %} retry_policy: retry_on: "5xx,connect-failure,refused-stream,reset,retriable-status-codes" num_retries: {{ llm_gateway_listener.max_retries }} - per_try_timeout: 30s + per_try_timeout: {{ llm_gateway_listener.timeout }} retriable_status_codes: [429, 500, 502, 503, 504] retry_back_off: base_interval: 0.5s diff --git a/crates/common/src/consts.rs b/crates/common/src/consts.rs index cafc8e809..81e28e866 100644 --- a/crates/common/src/consts.rs +++ b/crates/common/src/consts.rs @@ -3,10 +3,10 @@ pub const SYSTEM_ROLE: &str = "system"; pub const USER_ROLE: &str = "user"; pub const TOOL_ROLE: &str = "tool"; pub const ASSISTANT_ROLE: &str = "assistant"; -pub const ARCH_FC_REQUEST_TIMEOUT_MS: u64 = 30000; // 30 seconds -pub const DEFAULT_TARGET_REQUEST_TIMEOUT_MS: u64 = 30000; // 30 seconds -pub const API_REQUEST_TIMEOUT_MS: u64 = 30000; // 30 seconds -pub const MODEL_SERVER_REQUEST_TIMEOUT_MS: u64 = 30000; // 30 seconds +pub const ARCH_FC_REQUEST_TIMEOUT_MS: u64 = 300_000; // 300 seconds +pub const DEFAULT_TARGET_REQUEST_TIMEOUT_MS: u64 = 300_000; // 300 seconds +pub const API_REQUEST_TIMEOUT_MS: u64 = 300_000; // 300 seconds +pub const MODEL_SERVER_REQUEST_TIMEOUT_MS: u64 = 300_000; // 300 seconds pub const MODEL_SERVER_NAME: &str = "bright_staff"; pub const ARCH_ROUTING_HEADER: &str = "x-arch-llm-provider"; pub const MESSAGES_KEY: &str = "messages";