Skip to content

Conversation

@NateSmyth
Copy link

@NateSmyth NateSmyth commented Jan 17, 2026

Problem

Copilot changes the item_id on every event, meaning reasoning delta get dropped because they don't match the stored ID.

Fix

Reuse the existing currentTextId pattern that is already used for text streaming

Testing

Verified with:

  "provider": {
    "github-copilot": {
      "models": {
        "gpt-5.2-codex": {
          "variants": {
            "reasoning-test": {
              "reasoningEffort": "high",
              "reasoningSummary": "auto",
              "include": [
                "reasoning.encrypted_content"
              ],
              "store": false
            }
          }
        }
      }
    }
  }

Throws an error pre-fix.

"reasoning part <long base64 string>:0 not found"

Post-fix shows reasoning blocks in the UI.

Screenshot copilot_reasoning

Only works for Codex models via the /responses endpoint.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@rekram1-node
Copy link
Collaborator

/review

@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

lgtm

@NateSmyth
Copy link
Author

Tested all GPT-5* models with /responses, they all work
Only exceptions are gpt-5-codex and gpt-5.1-codex-mini, which don't work from either endpoint.
vs code uses /responses for them but they don't seem to work in opencode. Probably something to do with being "preview" models.

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.

2 participants