Skip to content

Action Gateway Tools in Responses Endpoint - #207

Open
tgillam-do wants to merge 9 commits into
mainfrom
tgillam/action-gateway-responses-tools
Open

tgillam-do wants to merge 9 commits into
mainfrom
tgillam/action-gateway-responses-tools

Conversation

@tgillam-do

@tgillam-do tgillam-do commented Aug 19, 2026 •

Copy link
Copy Markdown

Resolves issues with the Responses endpoint when using Action Gateway tools.

tgillam-do and others added 9 commits July 24, 2026 12:25
Bring the feature branch onto the latest generated client baseline while preserving its Action Gateway API additions.

Co-authored-by: Cursor <cursoragent@cursor.com>
Make the Responses provider easy to select and stop advertising legacy compatibility aliases that produce invalid or confusing tool schemas.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Action Gateway support across generated APIs, inference providers, documentation, examples, and tests.

Changes:

  • Adds session-bound tool handling for Chat Completions, Messages, and Responses.
  • Exposes generated Action Gateway resources for sessions, tools, toolbelts, connections, and users.
  • Adds package exports, documentation, examples, and mocked tests.

Reviewed changes

Copilot reviewed 33 out of 34 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/mocked/action-gateway.test.ts Tests Action Gateway workflows.
src/dots/v2/index.ts Exposes Action Gateway under V2.
src/dots/v2/actionGateway/users/item/index.ts Adds user lookup API.
src/dots/v2/actionGateway/users/index.ts Adds user listing API.
src/dots/v2/actionGateway/tools/toolkits/index.ts Adds toolkit listing API.
src/dots/v2/actionGateway/tools/providers/index.ts Adds provider listing API.
src/dots/v2/actionGateway/tools/item/index.ts Adds per-tool navigation.
src/dots/v2/actionGateway/tools/item/definition/index.ts Adds tool-definition retrieval.
src/dots/v2/actionGateway/tools/index.ts Adds tool registry APIs.
src/dots/v2/actionGateway/toolbelts/item/tools/remove/index.ts Adds toolbelt removal operation.
src/dots/v2/actionGateway/toolbelts/item/tools/index.ts Adds membership navigation.
src/dots/v2/actionGateway/toolbelts/item/tools/add/index.ts Adds toolbelt membership operation.
src/dots/v2/actionGateway/toolbelts/item/index.ts Adds toolbelt item operations.
src/dots/v2/actionGateway/toolbelts/index.ts Adds toolbelt collection APIs.
src/dots/v2/actionGateway/sessions/item/index.ts Adds session deletion API.
src/dots/v2/actionGateway/sessions/index.ts Adds session collection APIs.
src/dots/v2/actionGateway/index.ts Defines generated gateway navigation.
src/dots/v2/actionGateway/connections/item/index.ts Adds connection item operations.
src/dots/v2/actionGateway/connections/index.ts Adds connection collection APIs.
src/dots/kiota-lock.json Updates Kiota generation metadata.
src/action-gateway/index.ts Implements the high-level gateway client.
README.md Introduces Action Gateway usage.
package.json Exports the Action Gateway module.
examples/action-gateway/toolbelt-policy.ts Demonstrates toolbelt policies.
examples/action-gateway/session-controls.ts Demonstrates session controls.
examples/action-gateway/responses.ts Demonstrates Responses integration.
examples/action-gateway/public-api.ts Demonstrates generated APIs.
examples/action-gateway/messages.ts Demonstrates Messages integration.
examples/action-gateway/direct-tools.ts Demonstrates direct invocation.
examples/action-gateway/create-toolbelt.ts Demonstrates toolbelt management.
examples/action-gateway/chat-completions.ts Demonstrates Chat Completions.
examples/action-gateway/async.ts Demonstrates parallel tool loading.
docs/action-gateway.md Documents gateway workflows.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

}

function stringifyResult(value: unknown): string {
return typeof value === "string" ? value : JSON.stringify(value);
}

function externalSessionId(sessionUrn: string): string {
return sessionUrn.split(":").at(-1) ?? sessionUrn;
Comment on lines +470 to +477
const envelope = parseMCPEnvelope(text);
if (!response.ok) {
throw new GatewayError(
String(asObject(envelope).message ?? response.statusText ?? "request failed"),
response.status,
envelope,
);
}
Comment thread docs/action-gateway.md
Comment on lines +59 to +65
const response = await gateway.responses.create({
model: "openai-gpt-4o",
input: "Find the latest DigitalOcean news and summarize it.",
tools: await session.tools(),
});

const toolOutputs = await session.handleToolCalls(response);
Comment on lines +16 to +22
const response = await gateway.responses.create({
model: "openai-gpt-4o",
input: "Find the latest DigitalOcean news and summarize it.",
tools: await session.tools(),
});

console.dir(await session.handleToolCalls(response), { depth: null });

This branch has not been deployed

No deployments
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