Skip to content

feat(gateway): add OpenResponses /v1/responses endpoint#1229

Merged
steipete merged 7 commits into
openclaw:mainfrom
RyanLisse:main
Jan 20, 2026
Merged

feat(gateway): add OpenResponses /v1/responses endpoint#1229
steipete merged 7 commits into
openclaw:mainfrom
RyanLisse:main

Conversation

@RyanLisse

Copy link
Copy Markdown

Summary

  • Add `/v1/responses` endpoint implementing the OpenResponses API standard
  • Item-based input (messages, function_call_output, reasoning items)
  • Semantic streaming events (response.created, response.output_text.delta, etc.)
  • Configurable via `gateway.http.endpoints.responses.enabled`

Test plan

  • 19 e2e tests covering auth, validation, routing, streaming
  • 262 gateway tests pass (no regression)
  • Build compiles
  • Lint passes

🤖 Generated with Claude Code

@RyanLisse
RyanLisse marked this pull request as draft January 19, 2026 11:44
@RyanLisse
RyanLisse marked this pull request as ready for review January 19, 2026 11:44
@RyanLisse
RyanLisse marked this pull request as draft January 19, 2026 11:44
@RyanLisse
RyanLisse marked this pull request as ready for review January 19, 2026 12:00
@steipete steipete self-assigned this Jan 20, 2026
@steipete

Copy link
Copy Markdown
Contributor

Hi Ryan, very cool. I took this MVP as base and made it into sth mergable. thanks!

@RyanLisse

Copy link
Copy Markdown
Author

Awesome , any tips to make it easier for review, want to understand how to make it a proper pr

Ryan Lisse and others added 7 commits January 20, 2026 07:37
Add a new `/v1/responses` endpoint implementing the OpenResponses API
standard for agentic workflows. This provides:

- Item-based input (messages, function_call_output, reasoning)
- Semantic streaming events (response.created, response.output_text.delta,
  response.completed, etc.)
- Full SSE event support with both event: and data: lines
- Configuration via gateway.http.endpoints.responses.enabled

The endpoint is disabled by default and can be enabled independently
from the existing Chat Completions endpoint.

Phase 1 implementation supports:
- String or ItemParam[] input
- system/developer/user/assistant message roles
- function_call_output items
- instructions parameter
- Agent routing via headers or model parameter
- Session key management

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add input_image and input_file support with SSRF protection
- Add client-side tools (Hosted Tools) support
- Add turn-based tool flow with function_call_output handling
- Export buildAgentPrompt for testing
- Add schema validation tests for input_image, input_file, client tools
- Add buildAgentPrompt tests for turn-based tool flow
@steipete
steipete merged commit 11b9b6d into openclaw:main Jan 20, 2026
@steipete

Copy link
Copy Markdown
Contributor

Landed via temp rebase onto main.

  • Gate: pnpm lint && pnpm build && pnpm test
  • Land commit: bbc67f3
  • Merge commit: 11b9b6d

Thanks @RyanLisse!

lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
feat(gateway): add OpenResponses /v1/responses endpoint
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
feat(gateway): add OpenResponses /v1/responses endpoint
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
feat(gateway): add OpenResponses /v1/responses endpoint
karmafeast added a commit to karmaterminal/openclaw that referenced this pull request Jun 23, 2026
…to current upstream)

Back-merge current upstream HEAD f2b8668 onto the
drift6 assembly (c95c383 = drift6 merge cd255b3 + dead-export drop). Conflict-free
back-merge (0 unmerged paths). openclaw#1229 surface budget holds at measured 10354/5195 (no repin
needed — upstream's +59 commits did not touch the public package SDK entrypoint surface).
All 4 openclaw#1229 shard test files == upstream f2b8668 (current versions absorbed).

Refs: openclaw-bootstrap#1229, PR openclaw#85651

Co-authored-by: Copilot <[email protected]>
karmafeast added a commit to karmaterminal/openclaw that referenced this pull request Jun 23, 2026
Back-merge current upstream HEAD 2ea0e88 onto the
stabilized assembly (92f3816). Resolves 3 conflicts surfaced when upstream drifted
+20 past the prior pin:

- scripts/plugin-sdk-surface-report.mjs: openclaw#1229 budget re-pinned to measured-actual on the
  merged tree (publicExports 10354->10366; publicFunctionExports 5195 unchanged).
- src/agents/command/attempt-execution.ts: kept our continuation runtime (runWithDiagnosticTraceparent
  wrapper + continuation opts) and absorbed upstream's new chatId/channelContext fields into both
  runCliAgent call sites.
- src/auto-reply/reply/get-reply.ts: made upstream's new hookTrigger continuation-aware via our
  resolveReplyHookTrigger(opts), so the continuation=heartbeat-equivalent semantic flows uniformly
  to both the hook-context trigger and upstream's new buildAgentHookContextIdentityFields path
  (prevents a trigger=heartbeat + injected-user-identity contradiction).

Verified: typecheck exit0, lint exit0, oxfmt-clean, budget --check exit0,
attempt-execution continuation tests 127/127, auto-reply-reply shard 2862 pass,
run-provenance+hook-agent-context 16/16.

Refs: openclaw-bootstrap#1229, PR openclaw#85651

Co-authored-by: Copilot <[email protected]>
karmafeast added a commit to karmaterminal/openclaw that referenced this pull request Jun 23, 2026
…projects expected list

Conflict-free back-merge of current upstream HEAD f66e831 onto 900fcc9 (+15 drift).
Brings upstream's test/scripts/render-maturity-docs.test.ts + its TOOLING_SOURCE_TEST_TARGETS
routing (added by upstream 7668a72).

Fix folded in: upstream's 7668a72 added that test file (which imports test/helpers/temp-dir.ts)
+ the routing, but did NOT update the hardcoded expected includePatterns list in
src/scripts/test-projects.test.ts. Their own main is red on
'routes top-level test helpers to importing repo tests' as a result. Added the missing
'test/scripts/render-maturity-docs.test.ts' entry (alpha order). May drift if upstream lands
their own fix; trivial re-resolve.

Verified: test-projects.test.ts 83/83, typecheck exit0, lint exit0, oxfmt-clean,
openclaw#1229 budget 10366/5195 holds (no repin). drift#8 resolutions preserved (chatId/channelContext
in both runCliAgent sites; get-reply hookTrigger continuation-aware; 3 continuation tool files
byte-identical to 53c3025).

Refs: openclaw-bootstrap#1229, PR openclaw#85651

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants