Guides

Hermes Agent

LLMs Text

Hermes Agent

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.4 is more reliable for everyday use, while gpt-5.4-mini is 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

ModelBest for
gpt-6-astraNew-generation flagship; billed at 15% of the official price
gpt-5.6-solFlagship model for complex coding, long-running tasks, and multi-file refactoring
gpt-5.6-terra / gpt-5.6-lunaBalanced / cheaper and faster
gpt-5.5Previous-generation flagship
gpt-5.4Recommended default choice; more reliable for general tasks
gpt-5.4-miniGeneral Q&A, simple copy edits, and short code snippets; fast and low-cost
gpt-5.3-codexCode 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_url is https://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.

References