Loading workspace insights... Statistics interval
7 days30 daysLatest CI Pipeline Executions
0ced7d0b fix(ai-openai): preserve native combined-mode `text.format` wiring in subclass override
`OpenAITextAdapter.mapOptionsToRequest` reimplemented the base's request
shaping inline, which silently dropped the new `outputSchema -> text.format`
wiring (#605). Combined with the inherited `supportsCombinedToolsAndSchema()`
returning true, the engine emitted `structured-output.start` and called
`harvestCombinedStructuredOutput`, but the OpenAI request never carried a
schema constraint — the model returned natural-language text and the harvest
threw `structured-output-parse-failed` on every `chat({ adapter: openaiText(...), outputSchema, stream: true })`.
Reproduced via examples/ts-react-chat structured-output demo on gpt-4o and
gpt-5.2: bug present pre-fix, both pass post-fix with valid schema-conforming
JSON and no `structuredOutput` middleware phase fired (native combined-mode
path).
Delegate to `super.mapOptionsToRequest` with a tools-less view of `options`
to inherit the base's input mapping, system-prompt normalization, modelOptions
precedence, and `text.format` wiring; then layer OpenAI's full tool converter
(file_search, web_search, etc.) on top. Net: ~25-line override instead of 50,
and future base-class additions flow through automatically. 0ced7d0b fix(ai-openai): preserve native combined-mode `text.format` wiring in subclass override
`OpenAITextAdapter.mapOptionsToRequest` reimplemented the base's request
shaping inline, which silently dropped the new `outputSchema -> text.format`
wiring (#605). Combined with the inherited `supportsCombinedToolsAndSchema()`
returning true, the engine emitted `structured-output.start` and called
`harvestCombinedStructuredOutput`, but the OpenAI request never carried a
schema constraint — the model returned natural-language text and the harvest
threw `structured-output-parse-failed` on every `chat({ adapter: openaiText(...), outputSchema, stream: true })`.
Reproduced via examples/ts-react-chat structured-output demo on gpt-4o and
gpt-5.2: bug present pre-fix, both pass post-fix with valid schema-conforming
JSON and no `structuredOutput` middleware phase fired (native combined-mode
path).
Delegate to `super.mapOptionsToRequest` with a tools-less view of `options`
to inherit the base's input mapping, system-prompt normalization, modelOptions
precedence, and `text.format` wiring; then layer OpenAI's full tool converter
(file_search, web_search, etc.) on top. Net: ~25-line override instead of 50,
and future base-class additions flow through automatically. d987a0ac chore(ai-anthropic): bump @anthropic-ai/sdk to 0.97.1 and route Messages calls through client.beta
@anthropic-ai/sdk 0.71 → 0.97 graduated `output_config.format` to GA, so
the beta-typed cast at the streaming call site is no longer needed. The
upgrade also narrowed non-beta `MessageCreateParamsNonStreaming.container`
to `string | null`, which is incompatible with our beta-typed
`InternalTextProviderOptions.container` — route `structuredOutput`
through `client.beta.messages.create(...)` too so the request mapper
stays single-shape. Handle the new `'compaction'` variant in
`BetaStopReason`, and add a comment explaining why we route through
`client.beta` (permanent staging surface, superset of non-beta, accepts
`betas` headers + richer `container` / `context_management`).
Also: expand the Grok dropdown in the structured-output example
(grok-4.3, grok-4.20, grok-4-1-fast-*, grok-4-fast-*, grok-code-fast-1;
drop grok-3 which rejects combined tools+schema), rename a shadowed
`transformedConfig` in the engine agent loop, and tidy `as StreamChunk`
casts in the new engine test file.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> d987a0ac chore(ai-anthropic): bump @anthropic-ai/sdk to 0.97.1 and route Messages calls through client.beta
@anthropic-ai/sdk 0.71 → 0.97 graduated `output_config.format` to GA, so
the beta-typed cast at the streaming call site is no longer needed. The
upgrade also narrowed non-beta `MessageCreateParamsNonStreaming.container`
to `string | null`, which is incompatible with our beta-typed
`InternalTextProviderOptions.container` — route `structuredOutput`
through `client.beta.messages.create(...)` too so the request mapper
stays single-shape. Handle the new `'compaction'` variant in
`BetaStopReason`, and add a comment explaining why we route through
`client.beta` (permanent staging surface, superset of non-beta, accepts
`betas` headers + richer `container` / `context_management`).
Also: expand the Grok dropdown in the structured-output example
(grok-4.3, grok-4.20, grok-4-1-fast-*, grok-4-fast-*, grok-code-fast-1;
drop grok-3 which rejects combined tools+schema), rename a shadowed
`transformedConfig` in the engine agent loop, and tidy `as StreamChunk`
casts in the new engine test file.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> 425f4e9f feat(ai-gemini, ai-grok): native combined tools+schema mode + fix E2E from prior commits
Closes the per-provider gap left by the initial #605 landing. The engine
plumbing is unchanged — this just adds two more adapters to the
\`supportsCombinedToolsAndSchema()\` opt-in and wires their
schema-field-name into \`mapOptionsToRequest\`.
**ai-gemini**
- New \`GEMINI_COMBINED_TOOLS_AND_SCHEMA_MODELS\` set covering Gemini 3.x
(3-pro, 3-pro-preview, 3-flash, 3.1-pro-preview, 3.1-flash-lite).
Gemini 2.x is documented as brittle for the combination and stays on
the legacy finalization path.
- \`supportsCombinedToolsAndSchema()\` returns true for set members.
- \`mapCommonOptionsToGemini\` attaches
\`config.responseSchema\` + \`responseMimeType: 'application/json'\`
when \`options.outputSchema\` is set, alongside any tools.
- Unit tests verify wire shape for Gemini 3 and gate enforcement for
Gemini 2.5.
**ai-grok**
- New \`GROK_COMBINED_TOOLS_AND_SCHEMA_MODELS\` set covering the Grok 4
family (grok-4, grok-4-1-fast-*, grok-4-fast-*, grok-4-20*, grok-4-3,
grok-code-fast-1). Grok 2 / 3 reject the combination per xAI docs.
- Override flips \`supportsCombinedToolsAndSchema()\` from blanket-false to
a model-meta-set check. The actual wire wiring is already correct
(inherited from \`openai-base\` chat-completions); this just narrows the
capability claim.
- Unit test verifies per-model gate enforcement.
**E2E fixes**
- \`structured-output-middleware.spec.ts\`: my new "native combined mode
(openai)" assertion was checking \`expect(phases).toContain('beforeModel')\`,
but the phase-recorder middleware records \`ctx.phase\` from \`onChunk\`
and chunks during streaming are tagged \`'modelStream'\`. Fixed to
\`'modelStream'\`.
- \`multi-turn-structured\`: temporarily exclude anthropic from the
matrix. Tracking via #613 — 2nd turn's structured-output-part shows
1st turn's content under native combined path for some reason. All
other providers (including openai, also on native combined path) pass.
Single-turn anthropic structured-output continues to pass.
**Docs + skills**
- \`docs/structured-outputs/overview.md\` and \`docs/advanced/middleware.md\`:
expanded the native combined providers list to include Gemini 3.x +
Grok 4.x family.
- \`structured-outputs\` SKILL: replaced the streaming coverage table with
a richer per-adapter status that distinguishes native combined mode
from legacy \`structuredOutputStream\` from fallback. Added an
explanation of how the capability flag drives the choice.
- \`adapter-configuration\` SKILL: new Pattern 5 documenting the
\`supportsCombinedToolsAndSchema\` method, with the current per-adapter
status table.
**Changeset** updated to bump ai-gemini and ai-grok to minor, document the
expanded provider list, and note OpenRouter's per-call lookup is a
follow-up (tracked in #612).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com> 425f4e9f feat(ai-gemini, ai-grok): native combined tools+schema mode + fix E2E from prior commits
Closes the per-provider gap left by the initial #605 landing. The engine
plumbing is unchanged — this just adds two more adapters to the
\`supportsCombinedToolsAndSchema()\` opt-in and wires their
schema-field-name into \`mapOptionsToRequest\`.
**ai-gemini**
- New \`GEMINI_COMBINED_TOOLS_AND_SCHEMA_MODELS\` set covering Gemini 3.x
(3-pro, 3-pro-preview, 3-flash, 3.1-pro-preview, 3.1-flash-lite).
Gemini 2.x is documented as brittle for the combination and stays on
the legacy finalization path.
- \`supportsCombinedToolsAndSchema()\` returns true for set members.
- \`mapCommonOptionsToGemini\` attaches
\`config.responseSchema\` + \`responseMimeType: 'application/json'\`
when \`options.outputSchema\` is set, alongside any tools.
- Unit tests verify wire shape for Gemini 3 and gate enforcement for
Gemini 2.5.
**ai-grok**
- New \`GROK_COMBINED_TOOLS_AND_SCHEMA_MODELS\` set covering the Grok 4
family (grok-4, grok-4-1-fast-*, grok-4-fast-*, grok-4-20*, grok-4-3,
grok-code-fast-1). Grok 2 / 3 reject the combination per xAI docs.
- Override flips \`supportsCombinedToolsAndSchema()\` from blanket-false to
a model-meta-set check. The actual wire wiring is already correct
(inherited from \`openai-base\` chat-completions); this just narrows the
capability claim.
- Unit test verifies per-model gate enforcement.
**E2E fixes**
- \`structured-output-middleware.spec.ts\`: my new "native combined mode
(openai)" assertion was checking \`expect(phases).toContain('beforeModel')\`,
but the phase-recorder middleware records \`ctx.phase\` from \`onChunk\`
and chunks during streaming are tagged \`'modelStream'\`. Fixed to
\`'modelStream'\`.
- \`multi-turn-structured\`: temporarily exclude anthropic from the
matrix. Tracking via #613 — 2nd turn's structured-output-part shows
1st turn's content under native combined path for some reason. All
other providers (including openai, also on native combined path) pass.
Single-turn anthropic structured-output continues to pass.
**Docs + skills**
- \`docs/structured-outputs/overview.md\` and \`docs/advanced/middleware.md\`:
expanded the native combined providers list to include Gemini 3.x +
Grok 4.x family.
- \`structured-outputs\` SKILL: replaced the streaming coverage table with
a richer per-adapter status that distinguishes native combined mode
from legacy \`structuredOutputStream\` from fallback. Added an
explanation of how the capability flag drives the choice.
- \`adapter-configuration\` SKILL: new Pattern 5 documenting the
\`supportsCombinedToolsAndSchema\` method, with the current per-adapter
status table.
**Changeset** updated to bump ai-gemini and ai-grok to minor, document the
expanded provider list, and note OpenRouter's per-call lookup is a
follow-up (tracked in #612).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>