Skip to content

fix: stop inventing usage attribution from the selected model - #736

Open
Leeeon233 wants to merge 2 commits into
mainfrom
fix/codex-per-model-usage-attribution
Open

Leeeon233 wants to merge 2 commits into
mainfrom
fix/codex-per-model-usage-attribution

Conversation

@Leeeon233

@Leeeon233 Leeeon233 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Risk/Confidence: medium/medium

Summary

  • Remove the CLI fallback that credited missing legacy modelUsage to the currently selected UI model.
  • Keep missing model attribution skipped instead of fabricated.
  • Update the usage delivery Spec and Agent Notes for Codex exact per-response attribution and the durable resume boundary.

Dependency and review status

The adapter implementation is LodyAI/acp-extension-codex#45. Independent review plus ablation found unresolved adapter P1s, so #45 is explicitly not ready to merge and the submodule pointer bump remains deferred. This PR intentionally does not bump the nested submodule pointer.

Verification

  • esbuild bundle for apps/cli/src/agent/agent-client.ts passes.
  • git diff --check passes.
  • Full pnpm check/Vitest was not run in this worktree because root dependencies are not installed.

Model: deepseek-flash

Remove the CLI fallback that credited missing legacy modelUsage to the
currently selected UI model. Unknown attribution is skipped rather than
fabricated.

Update the usage delivery Spec and Agent Notes for Codex exact
per-response attribution, the Codex adapter change, and the durable
resume boundary.

Model: deepseek-flash
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-15T15:56:37.609430Z bb0052d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bb0052d8d1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +26 to +27
- Never synthesize `modelUsage` from `currentModel`. A legacy adapter that omits model
attribution stays skipped/unattributed rather than being credited to the UI selection.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep the scoped AGENTS file under 8 KiB

This addition grows apps/cli/src/agent/AGENTS.md from 8,167 to 8,343 bytes, exceeding the repository's 8 KiB hard limit and causing the required documentation check to reject the change. Move explanatory content to the owning note or shorten the scoped rules before landing.

AGENTS.md reference: AGENTS.md:L26-L27

Useful? React with 👍 / 👎.

Record unresolved adapter P1s and measured ablation results. Preserve CLI projection and document missing-dependency validation limits.

Model: gpt-6
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.

1 participant