Skip to content

Structured Output extraction always fails with invalid JSON for the following input #2266

@bogoconic1

Description

@bogoconic1

Environment details

  • Programming language: Python 3.12
  • Package version: 1.70.0

Steps to reproduce

Set GOOGLE_API_KEY and run the below code

goal_review_call.py

The model outputs with a half-complete JSON, which doesn't resolve with retries, meaning it is not a transient issue. I tried running the script 3 times, all generations stopped with "violations":

{
  "reasoning": "The script execution failed with an unhandled `openai_harmony.HarmonyError` due to an unexpected EOS while parsing completion tokens. The traceback explicitly provides the fix: modify the call to `parse_messages_from_completion_tokens` to include `strict=False`. Because of the crash, the script did not produce the final CSV artifacts.",
  "is_valid": false,
  "violations":

Metadata

Metadata

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions