fix(devin): correct token usage and generate protobuf bindings - #184
Merged
Merged
Conversation
Devin reported cache reads and writes separately from its input tokens, so non-stream results understated context consumption and stream callers could not observe the cache accounting. Carry both cache fields through the provider and executor, include them in the OpenAI-compatible stream usage, and add them to the upstream input total. This keeps cache reads available as cached prompt-token detail while making prompt and total token counts represent all upstream input work.
The hand-maintained wire subset duplicated Devin's evolving schema and could misrepresent field types, presence, and tool-call identity. Provide a manual command that downloads a stable release, extracts its embedded descriptors, selects the required message dependencies, and generates Go bindings with pinned protobuf tools. Record the source version and checksums in the bindings and keep intermediate downloads and descriptors temporary. Builds and CI consume committed Go files without running the update pipeline. Keep Connect framing and public API translation inside the existing adapter. Use the standard Google Timestamp package and associate tool deltas by their actual IDs, with anonymous interleaving limited by the upstream contract. The extracted schema is not an official proto source distribution and does not establish that every CLI release uses an identical schema.
AtkinsChang
force-pushed
the
fix/devin/token-proto
branch
from
September 17, 2026 08:11
cfb7199 to
81e4443
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Extracted descriptors are not an official proto source distribution.
Validation