fix(pricing): add missing DEFAULT_PRICING entries for current models (#266) by jrob5756 · Pull Request #276 · microsoft/conductor · GitHub
Skip to content

fix(pricing): add missing DEFAULT_PRICING entries for current models (#266)#276

Merged
jrob5756 merged 1 commit into
mainfrom
fix/266-missing-model-pricing
Jul 2, 2026
Merged

fix(pricing): add missing DEFAULT_PRICING entries for current models (#266)#276
jrob5756 merged 1 commit into
mainfrom
fix/266-missing-model-pricing

Conversation

@jrob5756

@jrob5756 jrob5756 commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

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 main via #212 — verified at engine/workflow.py:1452/:1569. This PR addresses Bug 2: 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 (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:

    Model input output cache_read cache_write
    claude-opus-4.7, claude-opus-4.8 5.00 25.00 0.50 6.25
    claude-sonnet-5 3.00 15.00 0.30 3.75
    gpt-5.5, gpt-5.4, gpt-5.3-codex 2.00 8.00
    gpt-5-mini, gpt-5.4-mini 0.15 0.60
    gemini-3.5-flash 0.30 2.50

    Also fixed a now-stale (newest) comment on the 4.5 group. mai-code-1-flash-picker was intentionally omitted (no defensible family rate).

  • tests/test_engine/test_pricing.py — added a parametrized regression test asserting each new model resolves to non-None pricing at the expected rate; repointed the Discussion: silent fuzzy-match in get_pricing() can apply wrong context-window metadata #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.

  • CHANGELOG.md### Fixed entry 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-5 uses 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 passed
  • Related tests (test_context_window_events, test_base, test_usage) — 40 passed
  • uv run ruff check src tests — clean; format clean
  • uv run ty check src — only the pre-existing unrelated dialog_evaluator.py diagnostic

…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>
@jrob5756 jrob5756 marked this pull request as ready for review July 2, 2026 14:00
@jrob5756 jrob5756 merged commit e44c66b into main Jul 2, 2026
8 checks passed
@jrob5756 jrob5756 deleted the fix/266-missing-model-pricing branch July 2, 2026 14:01
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.

Sub-workflow agent usage/cost is omitted from the parent workflow's Token Usage Summary (+ missing pricing for claude-opus-4.8 / gpt-5.5)

1 participant