Skip to content

Commit ef8b51e

Browse files
sweetmantechclaude
andcommitted
docs(api-reference): add context override + 403 to /api/chat/workflow
Close two contract gaps surfaced by the open-agents diff (PR comment): - Add optional `context.contextLimit: number` to ChatWorkflowRequest so clients that already send `context` against open-agents' /api/chat port over unchanged. - Document 403 in the response list — separate from 404 so callers can distinguish "session/chat doesn't exist" from "session/chat exists but the API key's account doesn't own it" (the ownership check the Bearer auth model requires). Error response shape (`{status, message}` via ChatStreamErrorResponse) intentionally kept — matches existing api convention rather than open-agents' `{error, issues?}` shape. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent a55a1c6 commit ef8b51e

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

api-reference/openapi/research.json

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,8 +793,18 @@
793793
}
794794
}
795795
},
796+
"403": {
797+
"description": "The API key's account does not own the referenced `sessionId` or `chatId`.",
798+
"content": {
799+
"application/json": {
800+
"schema": {
801+
"$ref": "#/components/schemas/ChatStreamErrorResponse"
802+
}
803+
}
804+
}
805+
},
796806
"404": {
797-
"description": "Session or chat not found, or not owned by the API key's account.",
807+
"description": "Session or chat not found.",
798808
"content": {
799809
"application/json": {
800810
"schema": {
@@ -3244,6 +3254,16 @@
32443254
"type": "string",
32453255
"format": "uuid",
32463256
"description": "UUID of the session that owns both the chat and the sandbox. The session must have a non-null `sandbox_state` — call [POST /api/sandbox](/api-reference/sandbox/create) first if not."
3257+
},
3258+
"context": {
3259+
"type": "object",
3260+
"description": "Optional per-prompt context overrides forwarded into the agent loop.",
3261+
"properties": {
3262+
"contextLimit": {
3263+
"type": "integer",
3264+
"description": "Upper bound on the number of tokens / messages of conversation history the agent should consider for this prompt. Overrides the model's default for this call only."
3265+
}
3266+
}
32473267
}
32483268
}
32493269
},

0 commit comments

Comments
 (0)