Commit Graph
4 Commits
Author SHA1 Message Date
thefux 094e7195f0 Merge remote-tracking branch 'gitea/main' 2026-07-24 16:38:01 +00:00
Jeroen UbbinkandClaude Fable 5 50437a1cc6 refactor: require explicit settlement identity at the billing seams
Make model_obj/provider_fee required (still nullable) on
adjust_payment_for_tokens, get_x_cashu_cost and the private pricing
helpers so a call site that fails to thread the served candidate is a
type error instead of a silent fallback to alias-map re-derivation.
calculate_cost keeps its defaults as the one documented fallback seam.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 15:13:40 +02:00
9qeklajc 22a94a68a4 test: extract passing coverage tests from #619 2026-07-18 15:58:54 +02:00
thefux 59bcc3cbbf test: add 17 base.py coverage tests (41%→42%)
Tests for previously untested methods:
- _extract_upstream_error_message (5 tests): JSON error, text error, empty body
- on_upstream_error_redirect (2 tests): 402, 429 status codes
- _fold_cache_into_input_tokens (2 tests): no cache, preserves total
- get_cached_models / get_cached_model_by_id (2 tests)
- get_x_cashu_cost (2 tests): with/without usage data
- get_balance / create_account / refresh_models_cache / fetch_models (4 tests)

ruff: clean, mypy: clean, 884 pass, 10 RED, 14 skip
2026-07-17 16:27:07 +00:00