GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: preserve Anthropic stream input usage by 0disoft · Pull Request #23 · lidge-jun/opencodex

Conversation

@0disoft

@0disoft 0disoft commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • accumulate Anthropic stream usage from message_start and message_delta
  • emit a single terminal done on message_stop, with EOF fallback when usage was already seen
  • add coverage for streamed input/cache usage plus output usage merging

Tests

  • bun test tests/adapter-usage.test.ts
  • bun test tests
  • bun run typecheck

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@0disoft
fix: preserve Anthropic stream input usage
3dec10b
@lidge-jun

lidge-jun commented Jun 23, 2026

Copy link
Copy Markdown
Owner

놀러갔다 오겠습니다 ㅎㅎ..

0disoft reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lidge-jun

lidge-jun commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Merged into local dev with a follow-up commit that changes mergeAnthropicUsage from spread-override to additive merge — prevents silent overwrite if Anthropic ever sends overlapping keys across message_start and message_delta. All 167 tests pass including your two new usage tests. Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lidge-jun

lidge-jun commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Merged into dev manually with a follow-up should-fix (additive usage merge). Thanks for the contribution!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lidge-jun lidge-jun closed this Jun 23, 2026
lidge-jun added a commit that referenced this pull request Jun 24, 2026
@lidge-jun @0disoft
fix: preserve Anthropic stream input usage
8e1c2c9
Cherry-pick PR #23 by @0disoft. Accumulate message_start input usage
and message_delta output usage into a single terminal done event on
message_stop, with EOF fallback when message_stop is missing.

Co-Authored-By: ZeroDi <[email protected]>
agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 2026
@lidge-jun @0disoft
fix: preserve Anthropic stream input usage
7618bd8
Cherry-pick PR lidge-jun#23 by @0disoft. Accumulate message_start input usage
and message_delta output usage into a single terminal done event on
message_stop, with EOF fallback when message_stop is missing.

Co-Authored-By: ZeroDi <[email protected]>
@coderabbitai coderabbitai Bot mentioned this pull request Sep 23, 2026
fix(desktop,cli): bundle lane G — sidecar signing, restart warning, probe ceilings, hidden autostart, mise updates, Linux packaged E2E #5682
Merged
3 tasks done
@wtfsayo wtfsayo mentioned this pull request Sep 27, 2026
fix(devin): resolve models through catalog family metadata #6091
Closed
7 tasks done
@lidge-jun lidge-jun mentioned this pull request Sep 28, 2026
fix(devin): resolve models through catalog family metadata (carry #6091) #6172
Merged
3 tasks done
lidge-jun added a commit that referenced this pull request Sep 28, 2026
@lidge-jun @wtfsayo @claude
fix(devin): resolve models through catalog family metadata (carry #6091…
dce4469
…) (#6172)

* fix(devin): resolve models through catalog family metadata

Parse ClientModelConfig #23 ModelInfo, #30 ModelFamilyMetadata and #31
default flag. A family id with no effort now selects the family's default
member (swe-1-7 -> swe-1-7-medium, not the Max row), an effort moves only
the effort axis to the nearest rung, Fast Mode and 1M Context follow only
explicit requests, and resolution never leaves the family. The suffix
fallback's variant scan matches the collapsed base instead of a string
prefix, so claude-opus-5 no longer lands on claude-opus-5-5-*.

The picker collapses by family, reads ladders from the effort axis, and
advertises the family default as defaultReasoningEffort; swe-1-6-fast
stays its own row. swe-1-6 is marked text-only (live: it drops images
silently) so the vision fallback applies.

Uncapped turns send the selected row's catalog maxOutputTokens instead of
8192. CompletionConfiguration #3 is max_newlines, now a fixed value; the
input-ceiling plumbing that fed it a context window is removed.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
(cherry picked from commit 09b9e6d)

* fix(devin): round a missing effort rung up, never down

An effort a family lacks now selects the lowest rung at or above it, then
the highest below. Nearest-rung sent `high` on SWE-1.7 (Medium, Max) to
Medium; it now selects the Max row. A disabled default rounds up the same
way and falls back down only when nothing above it is enabled.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
(cherry picked from commit ed6449e)

* fix(devin): keep a named disabled row and never lower effort for a toggle

A disabled exact uid asked for with an effort that still selects it (swe-2-max
at max) is now sent as named, so the preflight reports that row's refusal
instead of quietly serving swe-2-high. Family selection now ranks "effort not
lowered" ahead of the non-effort axes: a Fast anchor asked for at a rung the
Fast rows lack falls back to the regular row at or above that rung, and an
unranked member counts as lower. none is exempt, so Thinking-off still wins.

Co-authored-by: Sayo <[email protected]>

* fix(devin): advertise minimal family effort

Co-authored-by: Sayo <[email protected]>

* fix(devin): publish effective family default effort

Co-authored-by: Sayo <[email protected]>

---------

Co-authored-by: Sayo <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@0disoft @lidge-jun
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.