You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: FailedToOpenSocket when workspace lacks AI Gateway #116
get_gateway_host() auto-constructs an AI Gateway URL from DATABRICKS_WORKSPACE_ID (always set on Databricks Apps) without checking if the gateway actually exists. Workspaces without AI Gateway enabled get a FailedToOpenSocket error from Claude Code (Bun runtime) when it tries to connect to the non-existent host.
The fallback to {DATABRICKS_HOST}/serving-endpoints/anthropic never triggers because the gateway URL is returned unconditionally.
Affected code
utils.py:get_gateway_host() — returns unreachable URL without probing
All setup scripts (setup_claude.py, setup_codex.py, setup_gemini.py, setup_opencode.py, setup_proxy.py) — inherit the bad URL
Fix
Probe auto-discovered gateway URLs with a 2s timeout GET before using them
Cache the result in _GATEWAY_RESOLVED env var so subprocesses skip re-probing
Add resolve_and_cache_gateway() helper called once at boot
Fixed in #123 (v0.17.1) — AI Gateway URLs are now probed for reachability with a 2s timeout. Workspaces without AI Gateway gracefully fall back to {DATABRICKS_HOST}/serving-endpoints. Credit: @dgokeeffe.
Activity
datasciencemonkey commentedon Apr 14, 2026
Fixed in #123 (v0.17.1) — AI Gateway URLs are now probed for reachability with a 2s timeout. Workspaces without AI Gateway gracefully fall back to
{DATABRICKS_HOST}/serving-endpoints. Credit: @dgokeeffe.