Skip to content

feat(appkit): one chat integration#386

Open
MarioCadenas wants to merge 1 commit into
mainfrom
mario/responses-endpoint
Open

feat(appkit): one chat integration#386
MarioCadenas wants to merge 1 commit into
mainfrom
mario/responses-endpoint

Conversation

@MarioCadenas
Copy link
Copy Markdown
Collaborator

@MarioCadenas MarioCadenas commented May 14, 2026

Why

The OneChat platform integrates with AppKit agent apps by calling POST <app-url>/responses at the root level, sending the OpenAI Responses API request shape, and expecting a single JSON envelope back (not SSE). Until this PR, AppKit only exposed POST /invocations (SSE), so OneChat got 404 Cannot POST /responses from Express and had no compatible single-shot endpoint to consume.

This integration doesn't support HITL either so we handle that too.

Both endpoints now share a single _handleInvoke that runs the agent
once and returns an OpenAI Responses-shaped JSON envelope. The legacy
SSE behavior of /invocations is removed; streaming consumers should
move to POST /chat. A pre-flight HITL gate rejects (HTTP 400) any
agent that exposes approval-required tools (effect: write/update/
destructive or destructive: true), since non-streaming invocation
cannot run mid-call approval. The same rate-limit and thread-store
seeding logic from the streaming path is reused.

dev-playground gains a dependency-free responses_smoke agent (echo
tool) plus README curl recipes mirroring the OneChat Scala client
body shape, so /responses can be smoke-tested end-to-end against a
deployed Databricks App.
@MarioCadenas MarioCadenas force-pushed the mario/responses-endpoint branch from 58b32af to a39c399 Compare May 14, 2026 17:33
@MarioCadenas MarioCadenas changed the title feat(appkit): alias POST /invocations and /responses as non-streaming… feat(appkit): one chat integration May 14, 2026
@MarioCadenas MarioCadenas marked this pull request as ready for review May 14, 2026 17:36
@MarioCadenas MarioCadenas requested a review from a team as a code owner May 14, 2026 17:36
@MarioCadenas MarioCadenas requested a review from calvarjorge May 14, 2026 17:36
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.

1 participant