Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/hermes-gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ exact hostname and operation grant. No wildcard/allow-all destination exists.
| --- | --- | --- |
| `auth.openai.com` | POST `/oauth/token`, `/api/accounts/deviceauth/usercode`, `/api/accounts/deviceauth/token` | Caller-owned device login and token refresh |
| `chatgpt.com` | GET/POST `/backend-api/codex/` prefix | Caller-owned Codex OAuth, account/session headers, streaming |
| `portal.nousresearch.com` | POST `/api/oauth/device/code`, `/api/oauth/token`, `/oauth/code`, `/oauth/token` | Caller-owned Nous OAuth |
| `chatgpt.com` | GET `/backend-api/wham/usage` | Caller-owned Codex quota probe |
| `portal.nousresearch.com` | POST `/api/oauth/device/code`, `/api/oauth/token` | Caller-owned Nous OAuth |
| `inference-api.nousresearch.com` | GET/POST `/v1/` prefix | Caller-owned Nous model credential |
| `openrouter.ai` | GET/POST `/api/v1/` prefix | Caller-owned OpenRouter model credential |
| `api.openai.com` | GET/POST/DELETE `/v1/` prefix | Caller-owned models and file uploads/downloads |
Expand Down
18 changes: 17 additions & 1 deletion examples/hermes-gateway.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,28 @@ path_prefix = "/backend-api/codex/"
[routes.mediation]
kind = "forward"

[[routes]]
name = "codex-usage"
host = "chatgpt.com"
scheme = "https"
methods = ["GET"]
paths = ["/backend-api/wham/usage"]
allow_query = false
caller_headers = ["authorization", "cookie"]
session_response_headers = ["set-cookie", "www-authenticate"]
max_request_bytes = 268435456
max_response_bytes = 1073741824
max_duration_seconds = 3600
idle_timeout_seconds = 120
[routes.mediation]
kind = "forward"

[[routes]]
name = "nous-oauth"
host = "portal.nousresearch.com"
scheme = "https"
methods = ["POST"]
paths = ["/api/oauth/device/code", "/api/oauth/token", "/oauth/code", "/oauth/token"]
paths = ["/api/oauth/device/code", "/api/oauth/token"]
allow_query = true
caller_headers = ["authorization", "cookie"]
session_response_headers = ["set-cookie", "www-authenticate"]
Expand Down
Loading