POST /v1/messages — non-streaming #9
Labels
No labels
area/auth
area/batches
area/count-tokens
area/docs
area/errors
area/infra
area/messages
area/models
area/plugin
area/server
area/sessions
area/streaming
area/transform
priority/p0
priority/p1
priority/p2
status/blocked
status/done
status/in-progress
status/in-review
status/needs-rescope
status/todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
kalmiya/hermes-anthropic-api#9
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Kanban ticket:
t_a445eb1aBoard:
hermes-anthropic-apiTask t_a445eb1a: POST /v1/messages — non-streaming
status: ready
assignee: -
workspace: scratch
max-retries: 2 (default)
created: 2026-08-03 16:53 by kalmiya
Body:
Anthropic Messages API: create a message (non-streaming response).
Request shape (Anthropic):
model: string— resolves to Hermes provider/model via existing_resolve_routemachinery (or falls through to the agent's default provider).messages: [{role, content}]— system prompt lives in thesystemfield, NOT in messages.max_tokens: int— required.temperature,top_p,stop_sequences,metadata,tools,tool_choice,thinking,stream.Response shape:
{id, type: "message", role: "assistant", content: [{type: "text"|"tool_use"|"thinking", ...}], model, stop_reason, stop_sequence?, usage: {input_tokens, output_tokens, cache_creation_input_tokens?, cache_read_input_tokens?}}Source: https://docs.anthropic.com/en/api/messages
Notes:
systemfield and prepend to Hermes agent call as a system message.tool_useblocks when the agent invoked a tool.stop_reasonmapping: agent finish reasons → Anthropic (end_turn,max_tokens,stop_sequence,tool_use).usagemapping: pull from the agent's token accounting; emitcache_*fields when prompt caching is enabled.Status labels: status/todo on creation.
Events (1):
[2026-08-03 16:53] created {'assignee': None, 'status': 'ready', 'parents': [], 'tenant': None, 'workspace_kind': 'scratch', 'workspace_path': None, 'branch_name': None, 'project_id': None, 'skills': None, 'goal_mode': None, 'model_override': None, 'provider_override': None}