Fix/enterprise sso region - #261
Conversation
- Respect KIRO_REGION env var for API endpoint instead of letting credentials file override it (credentials region stored as SSO region) - Send profileArn for all auth types when available, not just Kiro Desktop (Enterprise SSO OIDC accounts need it too) - Log 403 response body for easier debugging
Some clients send the API key without the Bearer prefix.
Accept both 'Bearer {key}' and raw '{key}' formats.
This reverts commit ac88a45.
When upstream provider accepts connection but stops sending data, the gateway would hang forever (httpx read timeout resets on TCP keepalives). Add application-level inactivity timeout (300s default) that tracks time since last actual data chunk. Also adds periodic progress logging (every 60s) for long-running streams so operators have visibility into in-flight requests. New env vars: STREAMING_INACTIVITY_TIMEOUT, STREAMING_LOG_INTERVAL
…gion # Conflicts: # kiro/auth.py
When the upstream (Kiro/AWS API) accepts the TCP connection but never sends HTTP response headers, the gateway hangs indefinitely. This was the primary cause of today's outages — the retry after a 500 would send a new request that never got a response. Add RESPONSE_HEADERS_TIMEOUT (120s default) using asyncio.wait_for on the streaming client.send() call. Only applies to the pre-streaming phase; once headers arrive and streaming starts, the existing inactivity timeout governs. New env var: RESPONSE_HEADERS_TIMEOUT
Hermes sends the API key without the Bearer prefix. Accept both formats to maintain compatibility.
# Conflicts: # kiro/routes_anthropic.py # kiro/routes_openai.py
|
Thanks for the PR! 🎉 Before merge, we need a one-time CLA confirmation. Full CLA text: Please reply once with: You need to write once, all further messages from me can be ignored. |
c005691 to
fdd8498
Compare
|
Thanks for the PR! 🎉 Before merge, we need a one-time CLA confirmation. Full CLA text: Please reply once with: You need to write once, all further messages from me can be ignored. |
fdd8498 to
516fab1
Compare
|
Thanks for the PR! 🎉 Before merge, we need a one-time CLA confirmation. Full CLA text: Please reply once with: You need to write once, all further messages from me can be ignored. |
Gateway has two request paths: 1. Multi-account failover loop (already had retry) 2. Single-request path (was missing retry) Added retry with 3s/6s delay to the single-request path which is where ALL actual requests go. Now retries up to 2 times on INVALID_MODEL_ID before returning error.
516fab1 to
2693901
Compare
|
Thanks for the PR! 🎉 Before merge, we need a one-time CLA confirmation. Full CLA text: Please reply once with: You need to write once, all further messages from me can be ignored. |
|
@sandu-c could you give a try to this gateway: https://github.com/ankitcharolia/kiro-gateway It works quite well with All AI harness and actively being developed. The most important thing is that it is ACP compliant |
No description provided.