Skip to content

feat: v2.5.0 - models, tools, pricing from open-sourced Claude Code - #3

Merged
ttlequals0 merged 1 commit into
mainfrom
feature/source-code-improvements
Mar 31, 2026
Merged

feat: v2.5.0 - models, tools, pricing from open-sourced Claude Code#3
ttlequals0 merged 1 commit into
mainfrom
feature/source-code-improvements

Conversation

@ttlequals0

Copy link
Copy Markdown
Owner

Summary

Updates the wrapper with authoritative data extracted from Anthropic's open-sourced Claude Code CLI source:

  • Model accuracy: Added claude-sonnet-4-6, re-enabled 3.x models, per-model context windows/output limits/pricing
  • Tool registry: Expanded from 15 to 33 tools matching Claude Code's actual inventory (Agent, TaskCreate, EnterPlanMode, worktree tools, cron tools, etc.)
  • Retry logic: Exponential backoff with jitter, automatic Opus-to-Sonnet fallback after 3 consecutive 529s
  • Cost tracking: Per-request and per-session cost estimation using authoritative pricing, with auto-cleanup
  • Parameter support: X-Claude-Effort, X-Claude-Thinking headers, model-specific max_tokens validation
  • Code quality: Extracted shared options-building helper, deduplicated constants, asyncio.Lock
  • Docs: README rewritten (774 -> 280 lines), migration docs marked historical

Version

2.5.0

Docker

  • ttlequals0/claude-code-openai-wrapper:2.5.0
  • ttlequals0/claude-code-openai-wrapper:latest

Test plan

  • All 566 tests pass (35 new for retry + cost tracker)
  • Docker image built for linux/amd64 and pushed
  • Model/tool/pricing consistency verified programmatically
  • Security review: 0 findings above threshold
  • pyproject.toml and src/init.py versions match

…5.0)

- Add model metadata (context windows, output limits) and pricing from source
- Add claude-sonnet-4-6 and re-enable 3.x models confirmed supported
- Expand tool registry from 15 to 33 tools matching actual inventory
- Add retry module with exponential backoff and Opus-to-Sonnet fallback
- Add cost tracker with per-session accumulation and auto-cleanup
- Add X-Claude-Effort and X-Claude-Thinking header support
- Add model-specific max_tokens validation
- Extract shared options-building helper for streaming/non-streaming paths
- Rewrite README, trim historical migration docs
@ttlequals0
ttlequals0 merged commit ed0d38d into main Mar 31, 2026
@ttlequals0
ttlequals0 deleted the feature/source-code-improvements branch March 31, 2026 23:54
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