Skip to content

reproduction: generateText with Output.object throws NoOutputGeneratedError when finishReason is#17015

Draft
lgrammel wants to merge 1 commit into
mainfrom
bug-11348-1
Draft

reproduction: generateText with Output.object throws NoOutputGeneratedError when finishReason is#17015
lgrammel wants to merge 1 commit into
mainfrom
bug-11348-1

Conversation

@lgrammel

@lgrammel lgrammel commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Bug

generateText with Output.object() throws NoOutputGeneratedError when finishReason is undefined

Reproduction

  • Created examples/ai-functions/src/reproduction/issue-11348-generate-text-output-object-undefined-finish-reason.ts with a minimal custom LanguageModelV4 that returns valid schema-matching JSON text and an undefined normalized finish reason.
  • Expected result.output to return the same object produced by parsing result.text against the schema.
  • Observed result.text contained valid JSON and manual schema parsing succeeded, but accessing result.output threw AI_NoOutputGeneratedError: No output generated.

Relevant Documentation

Related Issues

Reproduces #11348

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant