{{ message }}
fix(pricing): add missing DEFAULT_PRICING entries for current models (#266)#276
Merged
Conversation
…266) Several current models had no DEFAULT_PRICING entry, so get_pricing returned None and they were silently costed at $0 in the Token Usage Summary / cost breakdown. Dotted version suffixes (e.g. claude-opus-4.8) are not bridged by the `-`-delimited fuzzy fallback, so exact keys are required. Add entries (grounded in the table's existing per-family rates): - claude-opus-4.7, claude-opus-4.8 (5/25, cache 0.50/6.25) - claude-sonnet-5 (3/15, cache 0.30/3.75) - gpt-5.5, gpt-5.4, gpt-5.3-codex (2/8) - gpt-5-mini, gpt-5.4-mini (0.15/0.60) - gemini-3.5-flash (0.30/2.50) Also add a regression test asserting each new model resolves to non-None pricing, and repoint the #137 cross-family test off claude-opus-4.7 (now a real key) to a synthetic claude-opus-4.123 so it still exercises the delimiter guard. The related sub-workflow usage under-reporting reported in the same issue was already fixed in #212. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

Closes #266 (pricing portion).
Summary
Issue #266 reported two bugs. Bug 1 (sub-workflow usage not merged into the parent tracker) was already fixed on
mainvia #212 — verified atengine/workflow.py:1452/:1569. This PR addresses Bug 2: several current models had noDEFAULT_PRICINGentry, soget_pricingreturnedNoneand they were silently costed at $0 in the Token Usage Summary / cost breakdown.Dotted version suffixes (e.g.
claude-opus-4.8) are not bridged by the--delimited fuzzy fallback (see #137), so exact keys are required.Changes
src/conductor/engine/pricing.py— added exact dotted-key entries, grounded in the table's existing per-family rates:claude-opus-4.7,claude-opus-4.8claude-sonnet-5gpt-5.5,gpt-5.4,gpt-5.3-codexgpt-5-mini,gpt-5.4-minigemini-3.5-flashAlso fixed a now-stale
(newest)comment on the 4.5 group.mai-code-1-flash-pickerwas intentionally omitted (no defensible family rate).tests/test_engine/test_pricing.py— added a parametrized regression test asserting each new model resolves to non-Nonepricing at the expected rate; repointed the Discussion: silent fuzzy-match in get_pricing() can apply wrong context-window metadata #137 cross-family test offclaude-opus-4.7(now a real key) to a syntheticclaude-opus-4.123so it still exercises the delimiter guard.CHANGELOG.md—### Fixedentry under[Unreleased].Notes / open for reviewer
gemini-3.5-flash(0.30/2.50) has no in-table Flash precedent — it's a best-effort estimate; happy to adjust to a sourced rate.claude-sonnet-5uses the Sonnet family's uniform 3/15 rate (stable across 3.5→4.6); confirm if the new major differs.Validation
uv run pytest tests/test_engine/test_pricing.py— 36 passedtest_context_window_events,test_base,test_usage) — 40 passeduv run ruff check src tests— clean; format cleanuv run ty check src— only the pre-existing unrelateddialog_evaluator.pydiagnostic