fix: auto-discover local gateway url

This commit is contained in:
2026-06-30 09:57:17 +08:00
parent 99194a8f7d
commit fc88744c50
4 changed files with 115 additions and 13 deletions
+12 -3
View File
@@ -14,13 +14,22 @@ Install as a user command:
```bash
uv tool install git+https://gitea.shujk.top/shujakuin/codex-retry-gateway-tui.git
codex-retry-gateway-tui --api-url http://127.0.0.1:4610/__codex_retry_gateway
codex-retry-gateway-tui
```
Default gateway URL:
Default behavior:
```text
http://127.0.0.1:4610/__codex_retry_gateway
1. reuse saved ~/.config/codex-retry-gateway-tui/api-url when present
2. otherwise auto-discover ~/.codex-retry-gateway/state.json gateway_base_url
3. otherwise fall back to ~/.codex-retry-gateway/config/config.json listen_host/listen_port
4. otherwise use http://127.0.0.1:4610/__codex_retry_gateway
```
Manual override example:
```bash
codex-retry-gateway-tui --api-url http://100.115.235.115:4610
```
Configuration: