mirror of
https://github.com/headroomlabs-ai/headroom.git
synced 2026-11-26 04:26:14 +08:00
feat/https-compose-caddy
5
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
703755e873 |
fix(pricing): add Claude Haiku 5.5 rates, 1M context and its 100K long-prompt card (#4037)
## Current maintainer qualification
Reviewed head
|
||
|
|
0d99c56dc5 |
fix(pricing): add Claude Sonnet 5.5 / Opus 5.5 / Fable 5.1, correct Sonnet 5 rates (#3841)
## Description
Claude Sonnet 5.5 and Opus 5.5 are released, and Anthropic made Claude
Sonnet 5's launch price its standard rate. This PR updates Headroom's
built-in Anthropic fallback price and context tables and the Rust
proxy's vendored LiteLLM snapshot to match current [Anthropic
pricing](https://platform.claude.com/docs/en/about-claude/pricing)
(verified 2026-09-29).
From the pricing page, footnote 3:
> The $2/$10 per million input/output token pricing for Claude Sonnet 5,
announced at launch as introductory pricing through August 31, 2026, is
now the standard price. The previously scheduled increase to $3/$15 per
million input/output tokens on September 1, 2026 will not occur.
This reverses the deliberate $3/$15 pin from #1767, which assumed that
increase would happen.
**Why the missing rows mispriced instead of failing:**
`AnthropicProvider._get_pricing` falls back to substring matching in
dict insertion order, so `claude-sonnet-5-5` silently inherited the
`claude-sonnet-5` row and `claude-fable-5-1` inherited Fable 5's $1
cache read. The Rust `context_window_for` is exact-match, so every
Claude 5-generation id fell through to the 128K default.
Closes #
## Type of Change
- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring (no functional changes)
## Changes Made
All values in $ / MTok (input / output / cache read).
| Model | Before (fallback) | After | Context |
|---|---|---|---|
| `claude-sonnet-5-5` | *(no row: matched `claude-sonnet-5`)* $3 / $15 /
$0.30 | **$2 / $10 / $0.20** | 1M |
| `claude-sonnet-5` | $3 / $15 / $0.30 | **$2 / $10 / $0.20** | 1M |
| `claude-opus-5-5` | *(no row: opus tier default)* $5 / $25 / $0.50 |
**$4 / $20 / $0.20** | 1M |
| `claude-opus-5` | *(no row: opus tier default)* | $5 / $25 / $0.50 |
1M |
| `claude-fable-5-1` | *(no row: matched `claude-fable-5`)* $10 / $50 /
$1.00 | **$10 / $50 / $0.25** | 1M |
- `headroom/providers/anthropic.py`:
- Adds the four new models to `ANTHROPIC_PRICING` and
`ANTHROPIC_CONTEXT_LIMITS` and corrects `claude-sonnet-5`.
- Newer ids are listed before their prefixes so dated or suffixed ids
(`…-5-5-20261001`, `…-5-5[1m]`) resolve to their own row.
- The `_PATTERN_DEFAULTS` tier rates are unchanged: they also cover
older unlisted models such as Sonnet 3.7.
- `crates/headroom-proxy/data/model_prices_and_context_window.json`:
appends the 113 missing upstream Claude 5-generation keys (first-party,
Bedrock regional/global/Mantle, Vertex, Azure, Databricks, OpenRouter
and similar). No existing entry changes or is removed. The snapshot is
extended rather than re-pulled with `scripts/refresh_model_limits.sh`:
- Upstream has since pruned 258 retired ids the proxy still serves, e.g.
`claude-3-7-sonnet-20250219` and `claude-opus-4-1`. Those would regress
from 200K to the 128K default.
- A full re-pull overwrites the hand-edited DeepSeek rate card from
#3575.
- `crates/headroom-proxy/src/compression/model_limits.rs`: new
`claude_5_generation_models_present` test.
- `tests/test_providers/test_anthropic.py`:
- The Sonnet 5 expectation moves to $2/$10/$0.20.
- New parametrized pricing and 1M-context tests for the new models,
including the prefix-collision cases.
- `tests/test_provider_model_fallback.py`: the "future opus" probe moves
from `claude-opus-5-20260101` to `claude-opus-6-20270101`. Opus 5 is now
a real 1M entry, so the old id no longer exercised the pattern fallback.
This mirrors the existing `claude-sonnet-6` probe.
## Testing
- [x] Unit tests pass (`pytest`)
- [x] Linting passes (`ruff check .`)
- [x] Type checking passes (`mypy headroom`) (run on the changed module,
`headroom/providers/anthropic.py`)
- [x] New tests added for new functionality
- [x] Manual testing performed
### Test Output
```text
$ cargo test -p headroom-proxy --lib compression::model_limits
test compression::model_limits::tests::claude_5_generation_models_present ... ok
test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 271 filtered out
$ HOME=$(mktemp -d) pytest -q tests/test_providers/test_anthropic.py tests/test_provider_model_fallback.py \
tests/test_cost_tracker_totals.py tests/test_pricing_from_litellm.py tests/test_pricing.py \
tests/test_openai_pricing_resolution.py
138 passed, 2 warnings
$ ruff check headroom/providers/anthropic.py tests/test_providers/test_anthropic.py tests/test_provider_model_fallback.py
All checks passed!
$ ruff format --check (same files)
3 files already formatted
$ cargo fmt -p headroom-proxy -- --check
(clean)
$ mypy headroom/providers/anthropic.py
Success: no issues found in 1 source file
```
On the broader pricing, cost and savings subset, 773 pass. The same 12
failures and 3 collection errors occur on unmodified `main` in my
environment, all `ModuleNotFoundError` from optional dev deps (`respx`
and others) that aren't installed locally. `HOME` is isolated because a
developer `~/.headroom/models.json` leaks into
`TestAnthropicConfigLoading`.
## Real Behavior Proof
- Environment: macOS, the repo `.venv` (Python 3.10). `origin/main` and
this PR head were each checked out as a git worktree and run with the
same interpreter and an isolated `HOME`.
- Exact command / steps: priced the same request through the built-in
fallback on `origin/main` and on this PR head (steps below).
- A script built `AnthropicProvider()`, stubbed
`estimate_cost_from_tokens` to return `None` to force the built-in
fallback (the LiteLLM-unavailable or offline path), and priced 1M input
tokens (800K cached) plus 100K output tokens for each model.
- For the Rust side, `context_window_for` semantics (exact key, `mode ==
"chat"`, `max_input_tokens`, 128K default) were applied to each
worktree's vendored JSON.
- Observed result: `origin/main` bills Sonnet 5.5 at $3/$15 and gives
every Claude 5-generation id a 128K Rust window; this PR bills $2/$10
and gives them 1M.
```text
origin/main
claude-sonnet-5-5 rates={'input': 3.0, 'output': 15.0, 'cached_input':
0.3} cost=$2.3400
claude-sonnet-5 rates={'input': 3.0, 'output': 15.0, 'cached_input':
0.3} cost=$2.3400
claude-opus-5-5 rates={'input': 5.0, 'output': 25.0, 'cached_input':
0.5} cost=$3.9000
claude-fable-5-1 rates={'input': 10.0, 'output': 50.0, 'cached_input':
1.0} cost=$7.8000
rust context_window_for: sonnet-5-5 / global.anthropic.claude-sonnet-5-5
/ opus-5-5 / fable-5-1 = 128000
this PR
claude-sonnet-5-5 rates={'input': 2.0, 'output': 10.0, 'cached_input':
0.2} cost=$1.5600
claude-sonnet-5 rates={'input': 2.0, 'output': 10.0, 'cached_input':
0.2} cost=$1.5600
claude-opus-5-5 rates={'input': 4.0, 'output': 20.0, 'cached_input':
0.2} cost=$2.9600
claude-fable-5-1 rates={'input': 10.0, 'output': 50.0, 'cached_input':
0.25} cost=$7.2000
rust context_window_for: all four = 1000000
```
The live LiteLLM `model_cost` already reports the "after" rates for all
of these, so the primary pricing path is unchanged. This fixes the
fallback path and the Rust proxy.
- Not tested: no live upstream Sonnet 5.5 request, no dashboard browser
check (details below).
- No live upstream requests were sent against Claude Sonnet 5.5.
- The dashboard savings tile was not exercised in a browser. It consumes
the same `estimate_cost` path shown above.
## Runtime Rollout Safety
- Rollout-managed feature(s): none. This is static pricing and context
metadata.
- Minimum rollout channel: n/a
- Stable/default behavior changed: yes, fallback cost estimates and the
Rust compression budget for Claude 5-generation ids only (details
below).
- Fallback cost estimates for the listed models drop to Anthropic's
published rates.
- The Rust proxy's compression budget for Claude 5-generation ids rises
from 128K to their real 1M window. The proxy now compresses those
requests later instead of over-trimming them.
- Kill switch / disable path: `HEADROOM_MODEL_LIMITS` or
`~/.headroom/models.json` can override any model's context limit or
pricing.
- Unsafe override required: no
- Qualification impact: none expected. Existing models' rows and
vendored entries are byte-identical.
- Rollback path: revert this commit.
## Review Readiness
- [x] I have performed a self-review
- [x] This PR is ready for human review
## Checklist
- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation (n/a: no
user-facing docs list model prices)
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] I did **not** edit `CHANGELOG.md` — it is generated by
release-please from my Conventional Commit PR title (a CI guard enforces
this) (my original commit did; @JerrettDavis removed it in
|
||
|
|
b0dfa33478 |
fix(pricing): DeepSeek V4.1-Flash peak/off-peak rate card (#3575)
## Description DeepSeek restructured its model line-up and price card, and Headroom's DeepSeek data was last verified 2026-06-19: the rows still carried the pre-restructure flat rates, `deepseek-flash` was unknown, and nothing could express the vendor's peak/off-peak split. Source (fetched and re-verified today): https://api-docs.deepseek.com/quick_start/pricing | | `deepseek-flash` (V4.1-Flash) | `deepseek-v4-pro` (V4-Pro-0813) | |---|---|---| | Context / max output | 1M / 384K | 1M / 384K | | Input (cache hit) | $0.003 off-peak / $0.006 peak | $0.022 / $0.044 | | Input (cache miss) | $0.15 / $0.30 | $0.66 / $1.32 | | Output | $0.60 / $1.20 | $1.98 / $3.96 | | Vision | yes | no | `deepseek-v4-flash` and `deepseek-v4-flash-vision-exp` are retired ids still accepted on the wire — served by V4.1-Flash and billed at the Flash price. Peak is exactly 2x off-peak; peak hours are 01:00-04:00 and 06:00-10:00 UTC, Monday-Friday. Context note: this surfaced while working on #3036, which routes DeepSeek traffic through the proxy and hard-codes the `deepseek-v4-*` ids in its routing tests. That branch is not touched here, and no issue is closed by this PR — it is a rate-card and model-data refresh. ## Type of Change - [x] Bug fix (non-breaking change that fixes an issue) ## Changes Made - Added `headroom/pricing/deepseek_tiers.py` as the single source of truth: the off-peak `(cache-hit, cache-miss, output)` table for `deepseek-flash` and `deepseek-v4-pro`, peak derived as exactly 2x, the retired-id aliases, the Beijing peak-window predicate with the weekend rule gated on its effective instant, and the `rates_for(model, now=None)` seam. - Made two cost seams tier-aware: `estimate_cost_from_tokens(..., now=None)` prices DeepSeek flash/pro from the tier selected by the request instant (litellm's `model_cost` holds one flat rate per model and cannot express a tier), and `PricingRegistry.estimate_cost(..., now=None)` prices them through its existing body from a synthesized rate row so there is one arithmetic body rather than two. - Gave `AnthropicProvider.estimate_cost` the same `now` passthrough and derived its DeepSeek fallback table from the tier module. - Derived every flat table from the tier module so no DeepSeek rate literal is left outside it: the `deepseek_prices` rows, the `litellm.model_cost` injection (now overriding and merging upstream rather than filling absent keys), and the Anthropic fallback table. Moved `LAST_UPDATED` / `SOURCE_URL` onto the module that owns the rates and re-exported them so existing import paths keep working. - Updated the model data: `deepseek-flash` registered with vision and both retired ids as aliases, provider context rows, the Hugging Face tokenizer map, the vendored LiteLLM snapshot, and the OpenCode guide's published rate card. ## Testing - [x] Unit tests pass (`pytest`) - [x] Linting passes (`ruff check .`) - [ ] Type checking passes (`mypy headroom`) - [x] New tests added for new functionality - [x] Manual testing performed ### Test Output ```text $ uv run pytest tests/test_providers tests/test_pricing.py tests/test_pricing_deepseek_tiers.py \ tests/test_pricing_from_litellm.py tests/test_pricing_litellm.py \ tests/test_pricing_litellm_model_resolution.py tests/test_models.py \ tests/test_huggingface_tokenizer_timeout.py tests/test_tokenizer_count_offload.py \ tests/test_cost_pricing_warning_dedup.py -q 291 passed, 3 warnings in 9.80s $ uv run ruff check . All checks passed! $ uv run mypy headroom headroom\integrations\langchain\chat_model.py:394: error: Function "RunnableBinding" could always be true in boolean context [truthy-function] Found 1 error in 1 file (checked 532 source files) $ cargo test -p headroom-proxy --lib compression::model_limits running 6 tests test compression::model_limits::tests::vendored_json_parses_at_runtime ... ok test compression::model_limits::tests::unknown_model_returns_default ... ok test compression::model_limits::tests::sample_spec_entry_is_excluded ... ok test compression::model_limits::tests::current_claude_models_present ... ok test compression::model_limits::tests::current_gpt_models_present ... ok test compression::model_limits::tests::empty_or_garbage_string_does_not_panic ... ok test result: ok. 6 passed; 0 failed $ uv run pytest tests/test_pricing_deepseek_tiers.py -q # with litellm hidden 47 passed $ uv run mypy headroom/pricing/deepseek_tiers.py headroom/pricing/registry.py \ headroom/pricing/litellm_pricing.py headroom/providers/anthropic.py Success: no issues found in 4 source files ``` The `mypy headroom` box is unticked on purpose: the single error above is pre-existing on `main` in `headroom/integrations/langchain/chat_model.py:394`, a file this PR does not touch (see Additional Notes). ## Real Behavior Proof - Environment: Windows 10, Python 3.13 in the repo's `.venv`, `uv`; litellm 1.88.1 installed (whose bundled cost map predates these ids, so the injected rows are what price them). - Exact command / steps: pinned instants Monday 2026-08-17 02:00 UTC (10:00 Beijing = peak) and 12:00 UTC (20:00 Beijing = off-peak), then: `uv run python -c "from datetime import datetime,timezone; from headroom.pricing.litellm_pricing import estimate_cost_from_tokens as e; P=datetime(2026,8,17,2,tzinfo=timezone.utc); O=datetime(2026,8,17,12,tzinfo=timezone.utc); print(e('deepseek-flash',10**6,10**6,now=O), e('deepseek-flash',10**6,10**6,now=P), e('deepseek-flash',10**6,0,cached_tokens=10**6,now=O), e('deepseek-v4-flash-vision-exp',10**6,10**6,now=O))"` - Observed result: `0.75` (off-peak flash), `1.5` (peak flash, exactly 2x), `0.003` (fully cached prompt billed once at the cache-hit rate), `0.75` (retired id prices as Flash). Also verified: 9 mutants of the new logic (peak multiplier, weekend gate, window start, alias resolution, cached-token handling, registry branch, provider passthrough) were each caught by the new tests, and `tests/test_pricing_deepseek_tiers.py` still passes with litellm absent (47 passed). - Not tested: the full test suite (hours on this box, and much of it cannot build a `TestClient` here because `NO_PROXY` contains a bare `::1`, so `httpx.URLPattern` raises `InvalidURL: Invalid port: ':'` — a pre-existing environment fault, confirmed by stashing this branch and re-running); CNY billing; the proxy budget guard and savings ledger, which remain flat by design (see Additional Notes). ## Runtime Rollout Safety - Rollout-managed feature(s): DeepSeek pricing and model data consumed by the pricing modules, providers, model registry and the Rust proxy's context limits. No feature flags are involved. - Minimum rollout channel: Stable. - Stable/default behavior changed: Yes — DeepSeek costs, model ids and capabilities change; the litellm `model_cost` DeepSeek rows now override upstream; and one context-limit fallback now resolves longest-prefix-first. All are itemised in Additional Notes. - Kill switch / disable path: revert this branch (no flag). Operators can override context limits without a release via `HEADROOM_MODEL_LIMITS` or `~/.headroom/models.json`, and provider pricing via the existing custom pricing config. - Unsafe override required: No. - Qualification impact: None — no schema, wire-format or session-format change; the vendored JSON keeps its upstream shape. - Rollback path: revert the merge commit; the only persisted artifact change is the vendored JSON, which reverts with it. ## Review Readiness - [x] I have performed a self-review - [x] This PR is ready for human review ## Screenshots (if applicable) Not applicable — no UI change. ## Additional Notes **Behaviour changes worth a reviewer's attention** 1. Flat figures are the off-peak tier by design; only the two cost seams are tier-aware. The proxy budget guard (`proxy/cost.py`), the savings ledger, `ModelRegistry.estimate_cost` and `OpenAICompatibleProvider.estimate_cost` remain flat or unpriced, so a peak-hour DeepSeek request can be under-estimated by up to 2x there. Making those tier-aware needs the request instant plumbed to each call site — deliberately a separate change. 2. The litellm DeepSeek rows now override upstream instead of filling only absent keys: upstream ships `deepseek-flash` at the *peak* rate, so fill-if-absent would have made the flat figure depend on the installed litellm version. The injection also merges (`{**upstream, **ours}`) so capability flags survive. 3. DeepSeek caps moved `384_000` -> `393_216` in the litellm-shaped tables (upstream's 384x1024 encoding of the published 384K). `ModelInfo` keeps the published `384_000`; the litellm-shaped tables are authoritative wherever litellm is consulted. 4. `OpenAICompatibleProvider`'s context fallback now matches the longest prefix first, mirroring the long-standing behaviour in `OpenAIProvider`. This fixes `deepseek-v4-flash-vision-exp` (was 1_048_576 via the shorter `deepseek-v4` key, now 1_000_000) and also changes the window for unlisted non-DeepSeek variants, e.g. `llama-3.1-8b-instruct` 8192 -> 128000, `mistral-large-2407` 32768 -> 128000, `starcoder2-15b` 8192 -> 16384. 5. `PricingRegistry.estimate_cost` no longer raises for a DeepSeek flash/pro id absent from `prices` — the tier table is authoritative for those four ids. Unknown non-DeepSeek ids still raise, and a flat row for a tiered id is deliberately ignored. 6. Weekend off-peak applies only from 2026-08-22T16:00Z, so a back-dated or replayed weekend request before that instant keeps the weekday windows rather than being silently repriced. `now` exists only on `AnthropicProvider.estimate_cost`; every other provider reads the wall clock for live traffic. 7. CNY billing is not modelled. The zh-cn page lists the same tiers in CNY, but the two lists are not one FX rate apart; supporting CNY-billed accounts needs a switch over two published lists, not a baked constant. **N/A / notes on checklist items** - `Type checking passes (mypy headroom)` is unticked for the pre-existing error above. `git diff --name-only origin/main..HEAD` contains no `integrations/langchain` path, so this PR does not introduce or touch it; `mypy` is clean on all four changed modules. - Out of scope: the stale `deepseek-v3` / `deepseek-coder` registry rows and the old `deepseek-chat` / `deepseek-reasoner` / `deepseek-v3.2` context rows (the vendor no longer lists them; pruning them is a behavioural change of its own). - The design and implementation plan for this change live in a separate workspace, so the decisions they record are inlined above rather than linked. --------- Co-authored-by: Zenjibad <316719033+Zenjibad@users.noreply.github.com> Co-authored-by: DSH Agent <agent@local> |
||
|
|
0e6d922f88 |
feat(pricing): add DeepSeek V4 model pricing (deepseek-v4-flash, deepseek-v4-pro) (#1168)
## Description Adds pricing support for DeepSeek V4 models (`deepseek-v4-flash` and `deepseek-v4-pro`) when routing Headroom through `--anthropic-api-url https://api.deepseek.com/anthropic`. The vendored LiteLLM pricing database predates DeepSeek V4, so cost estimation silently returned `None` for these models. ## Type of Change - [x] New feature (non-breaking change that adds functionality) ## Changes Made - **`headroom/pricing/deepseek_prices.py`** — New pricing data module with `ModelPricing` dataclass entries for both V4 models, following the pattern of `anthropic_prices.py` - **`headroom/pricing/__init__.py`** — Exports `DEEPSEEK_PRICES`, `get_deepseek_registry()`, `DEEPSEEK_LAST_UPDATED` - **`headroom/pricing/litellm_pricing.py`** — Runtime injection of DeepSeek V4 pricing into `litellm.model_cost`, plus `deepseek-` prefix added to `resolve_litellm_model()` provider prefix list - **`headroom/providers/anthropic.py`** — DeepSeek fallback in `_get_pricing()` when model starts with `deepseek-` and LiteLLM is unavailable - **`crates/headroom-proxy/data/model_prices_and_context_window.json`** — Vendored JSON entries (bare + provider-prefixed) for Rust-side context window lookups - **`tests/test_providers/test_deepseek.py`** — 20 tests across 3 test classes (pricing data, LiteLLM injection, Anthropic fallback) - **`tests/test_pricing.py`** — Added DeepSeek export validation alongside existing OpenAI/Anthropic assertions ## Testing - [x] Unit tests pass (`pytest`) - [ ] Linting passes (`ruff check .`) - [ ] Type checking passes (`mypy headroom`) - [x] New tests added for new functionality - [ ] Manual testing performed ### Test Output ``` ========================= 137 passed, 8 warnings in 8.47s ========================= ``` ## Real Behavior Proof - Environment: Windows 10, Python 3.12, litellm 1.60+ - Exact command / steps: `python -c "from headroom.proxy.cost import CostTracker; t = CostTracker(); print(t.estimate_cost('deepseek-v4-flash', input_tokens=1000000, output_tokens=1000000))"` - Observed result: `$0.4200` (0.14 input + 0.28 output per 1M tokens) - Not tested: Live DeepSeek API routing via `--anthropic-api-url` (requires API key and Docker deployment) ## Review Readiness - [x] I have performed a self-review - [x] This PR is ready for human review ## Checklist - [x] My code follows the project's style guidelines - [x] I have performed a self-review of my code - [x] I have commented my code, particularly in hard-to-understand areas - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] I have updated the CHANGELOG.md if applicable ## Additional Notes The 90% cache discount heuristic in `AnthropicProvider.estimate_cost()` (line 680) is a pre-existing pattern. DeepSeek V4 has much deeper cache discounts (98-99%), but the LiteLLM path currently falls through to the manual fallback which uses correct cached prices. A future improvement could prefer `cache_read_input_token_cost` from model info over the hardcoded `* 0.1` heuristic. --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
fa5fbfabf4 |
fix(rust): wire ICM compressor into Rust proxy on /v1/messages
Adds an opt-in compression interceptor that buffers Anthropic
/v1/messages requests, runs IntelligentContextManager over the
messages array, and forwards the (possibly trimmed) body upstream.
All other paths, methods, and content-types stay on the original
streaming passthrough — so existing operators see zero change.
Behaviour gates ALL must be true to buffer + compress:
- --compression flag (or HEADROOM_PROXY_COMPRESSION=1)
- method == POST
- path == /v1/messages
- Content-Type: application/json
- ICM constructed successfully at startup
Falls through to streaming on any failure: parse, missing fields,
unknown model, body-too-large. Compression must never break a
request — that's the safety contract.
Model context windows come from a vendored LiteLLM snapshot at
crates/headroom-proxy/data/model_prices_and_context_window.json
parsed once into an OnceLock<HashMap>. Refresh via
scripts/refresh_model_limits.sh. Rationale documented inline:
hardcoded tables silently rot; LiteLLM is the canonical source
the entire LLM-tooling ecosystem relies on.
New tests:
- 16 unit tests across compression::{anthropic, icm, model_limits}
- 5 integration tests: off-passthrough, on-short-passthrough,
on-oversized-trim, on-non-json-skip, on-non-llm-path-skip
Verification:
- cargo test --workspace -> 884 passed, 0 failed
- cargo clippy --workspace -- -D warnings -> clean
- cargo fmt --check -> clean
|