Skip to content

v2.27.0

Choose a tag to compare

@github-actions github-actions released this 01 Jul 06:46
· 5 commits to main since this release
v2.27.0
cad10b2

v2.27.0 — Claude Code v2.1.197 compatibility (Claude Sonnet 5)

CC v2.1.197 (npm latest+next, published 2026-06-30; installed binary → 2.1.197) is a single-bullet flagship-model release — the Claude Sonnet 5 launch (claude-sonnet-5), now the default model in Claude Code, native 1M context, promotional pricing $2/$10 per MTok through 2026-08-31 then standard $3/$15.

Why MINOR (not the usual docs-only PATCH)

Surface Impact
stdin JSON schema none — no new/changed/removed fields, no new env vars, no render changes
1M context already handled by get_native_context_window_size() (value, not a field)
model icon 🎵 reused ("Sonnet" substring) — no emoji-file change
cost / pricing code change — claude-sonnet-5 had no pattern and fell to the *) default ($3/$15) → ~50% over-count on the new default model during the promo (5th bare-ID→default-Sonnet fallback, after Opus 4.6/4.7/4.8 + Fable 5)

Added

  • Date-aware Sonnet 5 pricing (lib/cost/pricing.sh): dedicated claude-sonnet-5|claude-sonnet-5-* case block with date logic — 2.00 10.00 2.50 4.00 0.20 ($2/$10) while now < 1788220800 (= 2026-09-01 00:00:00 UTC), automatically reverting to 3.00 15.00 3.75 6.00 0.30 ($3/$15) at/after with no future action required. The awk pricing block (which can't use gawk-only systime()) single-sources the value from get_model_pricing, so the case path and the awk-embedded path flip together at the boundary. Only date +%s is used (identical on macOS/Linux); the boundary is a hardcoded, verified epoch constant — no cross-platform date -j/-d parsing. STATUSLINE_PRICING_NOW_EPOCH overrides "now" for deterministic tests.
  • Tests (+15): 9 unit (test_pricing.bats — promo / dated-ID / one-second-before / exactly-at-end / after-end branches, distinct-tier guard, 3 awk-block) + 5 integration (test_pricing_integration.bats — 1M input/output/cache-read at the promo rate end-to-end, the $3 transition after promo end, distinct-from-default) + 1 emoji (test_model_emoji.bats — Sonnet 5 → 🎵). All pin now so they stay valid past 2026-08-31.

Changed

  • Claude Code v2.1.197 compatibility: verified compatible through CC v2.1.197 via feature detection. All four authoritative sources (docs changelog, GitHub release, raw CHANGELOG.md, npm dist-tags { stable: 2.1.185, latest: 2.1.197, next: 2.1.197 }) carry v2.1.197 in sync — no docs-lag this cycle. Supported range now v2.1.6–v2.1.197.

Verification

  • Renders: claude-sonnet-5 → 🎵 Claude Sonnet 5, CC:2.1.197, all 9 lines, exit 0; claude-opus-4-8/claude-fable-5 blobs both CC:2.1.197.
  • Direct pricing: promo at real-now & forced-pre-boundary, standard at/after 1788220800; awk block flips identically; all other models unchanged.
  • shellcheck --severity=error lib/cost/pricing.sh: clean.
  • CI green on #417 and #418 (dual runs): Lint ✓, Validate ✓, Test macOS ✓, Test Ubuntu ✓.
  • Local full suite: 1143 ok / 41 not-ok (1184 of 1186 executed; +15 vs baseline; 0 critical-category failures — all not-ok are the known macOS-in-session environmental set; CI is the gate).

What's Changed

  • feat: CC v2.1.197 compatibility — Claude Sonnet 5 date-aware pricing by @rz1989s in #417
  • Release v2.27.0: CC v2.1.197 compatibility — Claude Sonnet 5 date-aware pricing by @rz1989s in #418

Full Changelog: v2.26.15...v2.27.0


Install

# curl installer (recommended)
curl -sSfL https://raw.githubusercontent.com/rz1989s/claude-code-statusline/main/install.sh | bash

# Homebrew (macOS)
brew update && brew upgrade claude-code-statusline