Skip to content

fix structured output pretty formatting#36

Open
Chris Ruppelt (Cruppelt) wants to merge 1 commit into
langchain-ai:mainfrom
Cruppelt:cruppelt/structured-output-fix
Open

fix structured output pretty formatting#36
Chris Ruppelt (Cruppelt) wants to merge 1 commit into
langchain-ai:mainfrom
Cruppelt:cruppelt/structured-output-fix

Conversation

@Cruppelt
Copy link
Copy Markdown

@Cruppelt Chris Ruppelt (Cruppelt) commented Jan 26, 2026

The current formatter is missing results for structured outputs in a trace's messages. - JSON_REDACTED section.

[
  {
    "role": "system",
    "content": "REDACTED"
  },
  {
    "role": "user",
    "content": "REDACTED"
  },
  {
    "id": [
      "langchain",
      "schema",
      "messages",
      "AIMessage"
    ],
    "kwargs": {
      "additional_kwargs": {
        "parsed": {
          "id": [
            "REDACTED"
          ],
          "lc": 1,
          "repr": "REDACTED",
          "type": "not_implemented"
        }
      },
      "content": [
        {
          "id": "REDACTED",
          "summary": [],
          "type": "reasoning"
        },
        {
          "annotations": [],
          "id": "msg_04c525be8d882ab3006977dc64cc948197802fba31a5351d60",
          "text": "JSON_REDACTED",
          "type": "text"
        }
      ],
      "id": "resp_04c525be8d882ab3006977dc613a10819799343c18e4771890",
      "invalid_tool_calls": [],
      "response_metadata": {
        "created_at": 1769462881.0,
        "id": "resp_04c525be8d882ab3006977dc613a10819799343c18e4771890",
        "metadata": {},
        "model": "gpt-5-mini-2025-08-07",
        "model_name": "gpt-5-mini-2025-08-07",
        "model_provider": "openai",
        "object": "response",
        "service_tier": "default",
        "status": "completed"
      },
      "tool_calls": [],
      "type": "ai",
      "usage_metadata": {
        "input_token_details": {
          "cache_read": 0
        },
        "input_tokens": 3860,
        "output_token_details": {
          "reasoning": 192
        },
        "output_tokens": 408,
        "total_tokens": 4268
      }
    },
    "lc": 1,
    "type": "constructor"
  }
]

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant