Skip to content

feat: record model response id in wire logs - #1349

Merged
liruifengv merged 4 commits into
mainfrom
add-record-id
Jul 3, 2026
Merged

feat: record model response id in wire logs#1349
liruifengv merged 4 commits into
mainfrom
add-record-id

Conversation

@liruifengv

Copy link
Copy Markdown
Collaborator

Related Issue

No related issue.

Problem

Session wire logs did not retain the provider response id for model requests, making it hard to correlate a recorded step with the upstream chatcmpl-... response when debugging provider issues.

What changed

  • Propagate the provider response id from the LLM response into the recorded step.end wire event as messageId.
  • Keep the field optional so providers that do not return an id omit it.
  • Add tests for the new field and update affected wire snapshots.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • 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.

Verification

  • pnpm --filter @moonshot-ai/agent-core test
  • pnpm --filter @moonshot-ai/agent-core typecheck
  • git diff --check

@changeset-bot

changeset-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5cf5feb

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

This PR includes changesets to release 3 packages
Name Type
@moonshot-ai/kimi-code Patch
@moonshot-ai/kimi-code-sdk Patch
@moonshot-ai/agent-core 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 Jul 3, 2026

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

commit: 5cf5feb

@liruifengv
liruifengv merged commit e9db9ca into main Jul 3, 2026
9 checks passed
@liruifengv
liruifengv deleted the add-record-id branch July 3, 2026 09:15
@github-actions github-actions Bot mentioned this pull request Jul 3, 2026
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