Skip to content

fix(agent-core-v2): restore thinking for the openrouter reasoning dialect - #3910

Merged
sailist merged 1 commit into
MoonshotAI:mainfrom
sailist:fix-openrouter-reasoning-display
Sep 18, 2026
Merged

sailist merged 1 commit into
MoonshotAI:mainfrom
sailist:fix-openrouter-reasoning-display

Conversation

@sailist

@sailist sailist commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

Resolve #3900

Problem

See linked issue. After #3492, OpenAI-compatible providers that return a reasoning string next to a reasoning_details array of unrecognized reasoning.text items (and no reasoning_content) drop the thinking chain on the way in, so the TUI stays blank.

What changed

  • Chat Completions now reads every inbound string reasoning field even when reasoning_details is present, then still converts official summary / encrypted details.
  • Each think part is stamped with its source key so the next request writes reasoning, reasoning_content, and official details back independently.
  • #3492 details + reasoning_content replay and the trait.reasoningKey details skip for interleaved models are unchanged. Unrecognized reasoning.text array items are still ignored.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (external PRs: the issue must have a maintainer's /approve).
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

…lect

Keep string reasoning fields when a reasoning_details array is present, stamp each think part by source, and replay those fields on the next request.
@changeset-bot

changeset-bot Bot commented Sep 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4c860c3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Sep 18, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@4c860c3
npx https://pkg.pr.new/@moonshot-ai/kimi-code@4c860c3

commit: 4c860c3

@sailist
sailist merged commit 7dc253c into MoonshotAI:main Sep 18, 2026
16 checks passed
7723qqq added a commit to 7723qqq/kimi-code that referenced this pull request Sep 20, 2026
Compaction pre-shrinks the summarizer's history to the model's
effective window before the first request (MoonshotAI#3911), replayed thinking on
OpenAI-compatible transports rides the declared `reasoning_key` (MoonshotAI#3910),
the catalog endpoints expose each provider's resolved `base_url` (MoonshotAI#3909),
usage telemetry fires for the swarm transition, external hooks,
remote-control toggles and tower entry/exit (MoonshotAI#3897), a steered message
carries its prompt's identity end to end (MoonshotAI#3906 / MoonshotAI#3891), and the rating
survey payload gains the per-turn trace id plus copilot statistics
(MoonshotAI#3907).
7723qqq added a commit to 7723qqq/kimi-code that referenced this pull request Sep 21, 2026
The module header and translate_global's doc comment both said the
workspace lane and plugin events "do not exist yet" — the workspace fold
arm sits forty lines below that comment, and the plugin arm above it.
Verified against the code: all four workspace mutation routes publish
event.workspace.created|updated|deleted on the global lane
(server/mod.rs:4147, 4279, 4305 plus set_trusted), translate_global folds
them into WorkspaceMessage from a per-connection cache seeded at connect,
and the tests pass (37 workspace + 12 ws_v3).

The one lane with nothing to translate is capability, and the reason is
narrower than "static list": upstream declares event.capability.changed
but never constructs it anywhere in its own tree, so there is no producer
to port. Both notes now say that.

ROADMAP §8.10 records the same finding: the "still open" list shrinks to
capability (no upstream producer) and MoonshotAI#3910's reasoning_details stamping
(deliberate).
Leeeon233 added a commit to LodyAI/acp-extension-kimi that referenced this pull request Sep 24, 2026
* feat(kimi-code): carry turn trace id and copilot stats in rating surveys (MoonshotAI#3907)

* feat: expose resolved base_url on models.dev catalog provider items (MoonshotAI#3909)

* fix(agent-core-v2): restore thinking for the openrouter reasoning dialect (MoonshotAI#3910)

Keep string reasoning fields when a reasoning_details array is present, stamp each think part by source, and replay those fields on the next request.

* ci: release packages (MoonshotAI#3862)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* docs(changelog): sync 2.0.1 from apps/kimi-code/CHANGELOG.md (MoonshotAI#3912)

* fix(agent-core-v2): pre-shrink compaction history to the effective model window (MoonshotAI#3911)

* fix(vscode): ignore Enter during IME composition in question dialog (MoonshotAI#3915)

* fix(kap-server): deliver session-level interaction events past agent filters (MoonshotAI#3901)

* revert(kap-server): drop the flat entity message protocol (v3 WS + history API) (MoonshotAI#3532) (MoonshotAI#3920)

This reverts 64505e3.

The v1 WS + legacy REST + transcript surfaces are alive on main and remain
the single protocol surface; kimi-inspect returns to the transcript-based
data model (keeping MoonshotAI#3747's removal of the prompt input, which adapted to
the agent-core-v2 prompt-queue fold).

* feat(oauth): parse goods_version from the managed /me profile payload (MoonshotAI#3921)

* fix: keep turn ids above the wire-wide max and fold cold transcripts over the active branch (MoonshotAI#3922)

* fix(agent-core-v2): floor the human turn clock at the wire-wide max on engine journal reset

* fix(kap-server): fold the cold transcript snapshot over the restorable branch chain

* fix(agent-core-v2): advance the human turn clock when a turn starts

* fix(kap-server): split reused wire turn ids in the live transcript projector

* fix(kap-server): adopt the completed cold tip for mid-turn attach events

Continuation deltas after a lazy transcript attach belong on the last
cold turn, not a newly split export id.

* fix(agent-core-v2): remove the project-root assertion for cwd from the system prompt (MoonshotAI#3929)

Co-authored-by: 7Sageer <7sageer@djwcb.cn>

* chore: remove the tdd skill (MoonshotAI#3932)

* fix(agent-core-v2): don't record turn.steer when an unconsumed steer seeds the next turn (MoonshotAI#3933)

* chore: sync web dist from code-app (MoonshotAI#3934)

* chore: sync web dist from code-app

code-app: 44d7281c7a63ee3c7a907f9406e490efdbec7411

* chore: collapse web dist sync changesets into one summary entry

* ci: release packages (MoonshotAI#3913)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* feat: generate native Kimi ACP session titles (#15)

---------

Co-authored-by: Grapedge <shiwang.lj@alibaba-inc.com>
Co-authored-by: liruifengv <liruifeng1024@gmail.com>
Co-authored-by: Haozhe <yanghaozhe@moonshot.ai>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: 7Hanrui <qihanrui@moonshot.ai>
Co-authored-by: 7Sageer <7sageer@djwcb.cn>
Co-authored-by: Zixuan Chen <remch183@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant