Skip to content

compatibility: cover AI SDK structured outputs - #553

Merged
sjungwon03 merged 1 commit into
mainfrom
test/552-ai-sdk-structured-output
Oct 28, 2026
Merged

sjungwon03 merged 1 commit into
mainfrom
test/552-ai-sdk-structured-output

Conversation

@sjungwon03

Copy link
Copy Markdown
Member

Closes #552. Refs #116; unresolved Jev #7 remains unchanged.

Actual pinned Output.object now exercises generateText/streamText on both bases through managed OpenAI/delegated OpenRouter, asserting exact schema/name/description/strict delivery. Forty-eight new cases cover valid/malformed/type-mismatched/extra-property output, admission/required persistence failures and native Anthropic/Gemini pre-secret schema rejection. No production code, pins, dependencies or storage change.

Measured client boundaries matter for accounting: malformed/wrong-type output raises a content-bearing NoObjectGeneratedError after successful provider completion/usage. Default Zod strips extra properties while gateway text stays exact. After a streaming audit/usage error the SDK may still resolve an object from delivered text, even though the server emits an error and withholds actual final usage/DONE. Parsed objects and client finish events must not be treated as server persistence acknowledgments or full returned-instance conformance.

Plan: 552-ai-sdk-structured-output. Contracts: AI SDK workflows, response formats. Reproduction: structured objects.

Validation:

  • Tests preceded any runtime changes. Initial 40 cases: 36 passed, 4 failed on the provisional assumption that stream result.output must reject after a persistence error. The measured SDK can resolve it; assertions now explicitly require both this client behavior and the server error/final-frame withholding. No gateway defect or production red/green cycle is claimed.
  • Final focused SDK/format selection on approved main c22b303 passed 258 cases, including the 8 added extra-property probes and merged image coverage.
  • Full npm run check on approved main c22b303: 7,725 total, 7,724 passed, zero failures/cancellations, one optional external PostgreSQL skip (~232sec). Typecheck, lint, planning/link/fixture-secret validation and all six offline integrity checks passed.
  • Existing 42 lint warnings/65 infos are unchanged. Planning/link/fixture-secret scan, whitespace and CLAUDE.md symlink checks passed. Production source, scripts, all six pins, dependencies and migrations are byte-unchanged relative to approved main.

The branch began independently from fcb40ea and updated onto approved c22b303 after PR #551 received approval/green CI and merged. Other Output modes/partial-object semantics, native mappings, server-side validation/repair, live provider guarantees, other SDK versions and full #116 remain uncertified.

Measure schema forwarding, client parsing and accounting across both
chat bases. Retain stream persistence errors even when the client can
resolve an object from previously delivered text.

Closes #552
Assisted-by: Codex
Signed-off-by: sjungwon03 <sjungwon03@gmail.com>
@github-actions github-actions Bot added ai-review-requested Review requested from sjungwon03-ai type:chore Routine maintenance labels Oct 28, 2026

@sjungwon03-ai sjungwon03-ai left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Review summary

Verdict: Approved

  • Reviewed: Structured-object schema forwarding, client parsing and extra-property behavior, admission and persistence gates, native-provider rejection, privacy assertions, and matching contract documentation across both API bases.
  • Checks: All three GitHub checks passed; 258 focused AI SDK/response-format tests, TypeScript typecheck, focused Biome validation, and planning/link/fixture-secret validation passed locally.

@sjungwon03
sjungwon03 merged commit c7a2cf5 into main Oct 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review-requested Review requested from sjungwon03-ai type:chore Routine maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: cover AI SDK structured-output workflows

2 participants