Hermes Agent uses the OpenAI-compatible chat/completions protocol. Point its custom endpoint to 4AICode to use models such as gpt-6-astra, gpt-5.6-sol, gpt-5.5, gpt-5.4, and gpt-5.4-mini in Hermes.
Prerequisites
- 4AICode token: Create one in Dashboard → Manage Tokens. The format is
sk-4ai-... - Base URL:
https://relay.4aicode.com/v1 - Recommended models:
gpt-5.4is more reliable for everyday use, whilegpt-5.4-miniis suitable for lightweight tasks and cost-sensitive scenarios
Configuration
Run Hermes' built-in model configuration wizard:
hermes model
Follow the prompts and select:
More providers...
Custom endpoint (enter URL manually)
Then enter:
API base URL: https://relay.4aicode.com/v1
API key: sk-4ai-xxxxxxxxxxxxxxxx
Next, select from the model list:
gpt-5.4
After configuration is complete, run:
hermes chat
Available Models
| Model | Best for |
|---|---|
gpt-6-astra | New-generation flagship; billed at 15% of the official price |
gpt-5.6-sol | Flagship model for complex coding, long-running tasks, and multi-file refactoring |
gpt-5.6-terra / gpt-5.6-luna | Balanced / cheaper and faster |
gpt-5.5 | Previous-generation flagship |
gpt-5.4 | Recommended default choice; more reliable for general tasks |
gpt-5.4-mini | General Q&A, simple copy edits, and short code snippets; fast and low-cost |
gpt-5.3-codex | Code optimization model |
Testing
After entering Hermes, send a message such as:
Hello, introduce yourself in one sentence
If it responds normally, the configuration was successful.
FAQ
Empty response from model
Hermes uses /v1/chat/completions. In hermes model, enter the Base URL as https://relay.4aicode.com/v1, so Hermes automatically appends /chat/completions.
Run hermes model again and verify the Base URL, API key, and Model name.
Seeing response.created / response.completed
This means the client received an SSE event stream from the Responses API. Hermes requires the Chat Completions format, and 4AICode's /v1/chat/completions automatically converts it. If this occurs, first check:
- Whether
base_urlishttps://relay.4aicode.com/v1 - Whether the request path is
/v1/chat/completions - Whether the 4AICode backend has been deployed with the latest version
Model not supported
Older model names such as gpt-5 and gpt-5-codex have been deprecated. Run hermes model again and select gpt-5.4.