fix: serve Bedrock GPT CRIS profiles through Runtime Responses

Closed
SC
1mo ago
+157-49

Fixes #3065

What

Bedrock Runtime Chat Completions rejects function tools combined with reasoning for GPT-6 / GPT-5.6 Luna profiles (us.openai.gpt-6-luna). Chat and Messages callers for catalogued GPT profiles are now translated to the Runtime Responses API through the existing Chat-to-Responses path.

  • chatViaResponses flag on the GPT entries of the Runtime capability catalog; resolveBedrockEndpointKey honours it.
  • bedrock-runtime-responses maps reasoning_effort to reasoning with summary: 'auto' (new acceptsReasoningSummary endpoint flag).
  • Kimi K3 stays on Runtime Chat Completions.

Tests

Backend src/routing: 164 suites, 4615 tests pass; tsc and eslint clean. Not exercised against live Bedrock (no API key available): worth one tools + reasoning_effort call on Luna before merge.

๐Ÿค– Generated with Claude Code


Summary by cubic

Fixes #3065 so Bedrock GPT CRIS profiles (e.g. us.openai.gpt-6-luna) can combine function tools with reasoning. Runtime Chat Completions rejects that combination, so Chat and Messages callers for catalogued GPT profiles now go through the Runtime Responses API via the existing Chat-to-Responses translation.

Also fixes streamed responses for these models, which previously came back empty because Bedrock Runtime sends SSE events without an event: line โ€” the event name is now read from data.type in the stream transformer and SSE collector, with each frame parsed once.

  • Adds a chatViaResponses flag to the GPT entries in the Runtime capability catalog; resolveBedrockEndpointKey honors it.
  • Maps reasoning_effort to reasoning with summary: 'auto' on the bedrock-runtime-responses endpoint via the new acceptsReasoningSummary flag.
  • Keeps Kimi K3 on Runtime Chat Completions.