Skip to content

chore(deps): require amplifier-agent 0.17.0 - #28

Merged
David Koleczek (DavidKoleczek) merged 1 commit into
mainfrom
chore/agent-floor-0.17.0
Aug 26, 2026
Merged

chore(deps): require amplifier-agent 0.17.0#28
David Koleczek (DavidKoleczek) merged 1 commit into
mainfrom
chore/agent-floor-0.17.0

Conversation

@DavidKoleczek

Copy link
Copy Markdown
Collaborator

Moves the engine floor to the release cut in microsoft/amplifier-agent#158.

MIN_AGENT_VERSION  0.16.0 -> 0.17.0
AGENT_PINNED_REF   v0.16.0 -> v0.17.0   (follows MIN_AGENT_VERSION)
AGENT_HARD_FLOOR   0.16.0 -> 0.17.0     (follows MIN_AGENT_VERSION)

Why this floor moves

Below 0.17.0 the token counts this application puts in front of users are wrong.

The engine's extract_usage() computed the OpenAI-wire usage.prompt_tokens as inputTokens + cacheReadTokens + cacheWriteTokens, on the premise that the three are disjoint buckets. They are not: per amplifier-core's PROVIDER_CONTRACT.md, inputTokens is the gross input total and already contains the cache reads, so the cached portion was counted twice. On a cache-heavy turn — the normal case in an agent loop — that roughly doubles the reported prompt.

That figure arrives on /v1/chat/completions, the endpoint we drive for every turn, and opencode's TUI displays it. Nothing in this repo parses the usage block itself, which is exactly why the bad number passed straight through to the user rather than being caught here.

This is a correctness bump, not an adoption bump. It is a stronger rationale than the last two floor moves, which the comment block records as adoption bumps taken to keep AGENT_PINNED_REF from drifting a release behind.

What does not force it

PROTOCOL_VERSION moved 0.3.0 -> 0.4.0 in 0.17.0, which looks like the obvious trigger and is not one. This application drives the HTTP face onlyserve, /v1/models, /v1/chat/completions, /v1/skills, /v1/modes — and never spawns through a wrapper SDK, so there is no stdio handshake here to fail. The comment block says so explicitly, so the next person reading it does not re-derive the wrong reason.

The engine's other 0.17.0 changes (--prompt-file, real per-turn usage on the run envelope, the wrapper SDK Usage type) are on surfaces this application does not use.

Cost of the bump

A floor move forces every opencode user through a reinstall at next launch, via the silent self-heal that targets AGENT_PINNED_REF. That cost is the reason the comment block justifies each bump individually.

Verification

make check passes (ruff lint + format, 56 files).

Nothing in this repo asserts these constants — tests/ is e2e-only and needs a DTU, and the onboarding suite's fake agent reports 99.0.0, comfortably above any real floor. So the check that matters is reading the constants back:

$ uv run python -c "from amplifier_app_opencode import prereqs as p; print(p.MIN_AGENT_VERSION, p.AGENT_PINNED_REF, p.AGENT_HARD_FLOOR)"
0.17.0 v0.17.0 0.17.0

v0.17.0 is pushed and its GitHub Release exists, so AGENT_PINNED_REF resolves to a real tag: https://github.com/microsoft/amplifier-agent/releases/tag/v0.17.0

🤖 Generated with Amplifier

Below 0.17.0 the token counts this application puts in front of users are
wrong. The engine's extract_usage() computed the OpenAI-wire
usage.prompt_tokens as inputTokens + cacheReadTokens + cacheWriteTokens, on
the premise that the three are disjoint buckets. They are not: per
amplifier-core's PROVIDER_CONTRACT.md, inputTokens is the gross input total
and already contains the cache reads, so the cached portion was counted
twice. On a cache-heavy turn -- the normal case in an agent loop -- that
roughly doubles the reported prompt.

That figure arrives on /v1/chat/completions, the endpoint we drive for every
turn, and opencode's TUI displays it. Nothing in this repo parses the usage
block itself, which is why the bad number passed straight through.

PROTOCOL_VERSION also moved (0.3.0 -> 0.4.0) in that release but does not
gate this application: we drive the HTTP face only and never spawn through a
wrapper SDK, so there is no stdio handshake here to fail.

AGENT_PINNED_REF and AGENT_HARD_FLOOR follow MIN_AGENT_VERSION and now
resolve to v0.17.0 and 0.17.0.

🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier)

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
@DavidKoleczek
David Koleczek (DavidKoleczek) merged commit 143a785 into main Aug 26, 2026
1 check passed
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