Opencode errors on asking a question #4654

Open
opened 2026-02-16 17:44:56 -05:00 by yindo · 1 comment
Owner

Originally created by @laycookie on GitHub (Jan 10, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Hello I just installed opencode, but when asking a question the model thinks for a little while and then proceeds to error with the following logs. I have attempted to use Big Pickle as well as GLM-4.7 but I get the same error.
Sadly I'm not really getting much information from this specific error, on what might be going on under the hood so if anyone can assist me with further diagnosing the issue, I would be very thankful.

INFO  2026-01-10T17:41:22 +0ms service=lsp file=/home/Dennis/Documents/Code/generic_messenger/record/src/main.rs touching file
INFO  2026-01-10T17:41:22 +0ms service=file.time sessionID=ses_4570cf5f8ffejJlSr9rEM33RxA file=/home/Dennis/Documents/Code/generic_messenger/record/src/main.rs read
INFO  2026-01-10T17:41:22 +1ms service=bus type=message.part.updated publishing
INFO  2026-01-10T17:41:22 +135ms service=bus type=message.part.updated publishing
INFO  2026-01-10T17:41:22 +4ms service=snapshot hash=45900e3f3a10439fb22c16b0ce058e46404e33f3
 cwd=/home/Dennis/Documents/Code/generic_messenger git=/home/Dennis/.local/share/opencode/snapshot/4e7c501e60ab180464400dc33e0081ce75292d61 tracking
ERROR 2026-01-10T17:41:22 +0ms service=session.processor error=[
  {
    "code": "invalid_union",
    "errors": [
      [
        {
          "expected": "string",
          "code": "invalid_type",
          "path": [
            "reason"
          ],
          "message": "Invalid input: expected string, received object"
        }
      ],
      [
        {
          "expected": "object",
          "code": "invalid_type",
          "path": [
            "part"
          ],
          "message": "Invalid input: expected object, received undefined"
        },
        {
          "expected": "string",
          "code": "invalid_type",
          "path": [
            "delta"
          ],
          "message": "Invalid input: expected string, received undefined"
        }
      ],
      [
        {
          "expected": "object",
          "code": "invalid_type",
          "path": [
            "part"
          ],
          "message": "Invalid input: expected object, received undefined"
        },
        {
          "expected": "string",
          "code": "invalid_type",
          "path": [
            "delta"
          ],
          "message": "Invalid input: expected string, received undefined"
        }
      ]
    ],
    "path": [],
    "message": "Invalid input"
  }
] process
INFO  2026-01-10T17:41:22 +0ms service=bus type=session.error publishing
INFO  2026-01-10T17:41:22 +1ms service=session.prompt sessionID=ses_4570cf5f8ffejJlSr9rEM33RxA cancel

Plugins

None

OpenCode version

1.0.105

Steps to reproduce

Ask any question

Screenshot and/or share link

No response

Operating System

Linux (NixOS 25.11.20251229.89dbf01 (Xantusia) x86_64)

Terminal

Kitty with nushell

Originally created by @laycookie on GitHub (Jan 10, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description Hello I just installed opencode, but when asking a question the model thinks for a little while and then proceeds to error with the following logs. I have attempted to use Big Pickle as well as GLM-4.7 but I get the same error. Sadly I'm not really getting much information from this specific error, on what might be going on under the hood so if anyone can assist me with further diagnosing the issue, I would be very thankful. ``` INFO 2026-01-10T17:41:22 +0ms service=lsp file=/home/Dennis/Documents/Code/generic_messenger/record/src/main.rs touching file INFO 2026-01-10T17:41:22 +0ms service=file.time sessionID=ses_4570cf5f8ffejJlSr9rEM33RxA file=/home/Dennis/Documents/Code/generic_messenger/record/src/main.rs read INFO 2026-01-10T17:41:22 +1ms service=bus type=message.part.updated publishing INFO 2026-01-10T17:41:22 +135ms service=bus type=message.part.updated publishing INFO 2026-01-10T17:41:22 +4ms service=snapshot hash=45900e3f3a10439fb22c16b0ce058e46404e33f3 cwd=/home/Dennis/Documents/Code/generic_messenger git=/home/Dennis/.local/share/opencode/snapshot/4e7c501e60ab180464400dc33e0081ce75292d61 tracking ERROR 2026-01-10T17:41:22 +0ms service=session.processor error=[ { "code": "invalid_union", "errors": [ [ { "expected": "string", "code": "invalid_type", "path": [ "reason" ], "message": "Invalid input: expected string, received object" } ], [ { "expected": "object", "code": "invalid_type", "path": [ "part" ], "message": "Invalid input: expected object, received undefined" }, { "expected": "string", "code": "invalid_type", "path": [ "delta" ], "message": "Invalid input: expected string, received undefined" } ], [ { "expected": "object", "code": "invalid_type", "path": [ "part" ], "message": "Invalid input: expected object, received undefined" }, { "expected": "string", "code": "invalid_type", "path": [ "delta" ], "message": "Invalid input: expected string, received undefined" } ] ], "path": [], "message": "Invalid input" } ] process INFO 2026-01-10T17:41:22 +0ms service=bus type=session.error publishing INFO 2026-01-10T17:41:22 +1ms service=session.prompt sessionID=ses_4570cf5f8ffejJlSr9rEM33RxA cancel ``` ### Plugins None ### OpenCode version 1.0.105 ### Steps to reproduce Ask any question ### Screenshot and/or share link _No response_ ### Operating System Linux (NixOS 25.11.20251229.89dbf01 (Xantusia) x86_64) ### Terminal Kitty with nushell
yindo added the bug label 2026-02-16 17:44:56 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 10, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #7439: AIHubMix provider: streaming completes output but errors near end with ZodError (invalid_union: reason/part/delta)

The error signature matches exactly - both show the same invalid_union validation error with 'reason', 'part', and 'delta' fields. Feel free to ignore if your specific case differs.

@github-actions[bot] commented on GitHub (Jan 10, 2026): This issue might be a duplicate of existing issues. Please check: - #7439: AIHubMix provider: streaming completes output but errors near end with ZodError (invalid_union: reason/part/delta) The error signature matches exactly - both show the same invalid_union validation error with 'reason', 'part', and 'delta' fields. Feel free to ignore if your specific case differs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4654