9qeklajc
9ef01acac9
Merge branch 'main' into pr-reactive-correction
2026-06-07 13:10:29 +02:00
9qeklajc
06c8a071a5
feat: reactive request-correction retry for recoverable upstream 400s
2026-06-07 13:00:19 +02:00
9qeklajc
9e9c2bde57
fix: buffer-based SSE parser for all supported providers
...
Replace the fragile `re.split(b"data: ")` streaming parser with a
buffered, event-delimited parser in both the chat-completion and
Responses-API streamers. Events are accumulated until the SSE blank-line
delimiter, so parsing is independent of network chunk boundaries.
Fixes:
- OpenRouter `: OPENROUTER PROCESSING` keepalive comments no longer leak
to clients as `data: : ...` (the `Unexpected token ':'` client crash).
- JSON payloads split across TCP reads are reassembled before parsing.
- CRLF framing (Gemini native alt=sse) handled.
- Combined content+usage chunks (Gemini thinking models over the
OpenAI-compat endpoint) forward content once and still report usage in
the cost trailer, instead of dropping the assistant message.
- Multi-line non-JSON `data` blocks are re-prefixed per line so they stay
valid SSE framing for the client.
Adds tests/unit/test_streaming_sse_providers.py driving the real
generator against per-provider on-the-wire framing, and switches the
integration token-mint fallback to secrets.token_hex to kill a
PRNG/clock collision flake.
2026-06-07 12:58:54 +02:00
9qeklajc
4abd751f5f
make sure model provider field naming is correct
2026-06-07 11:01:53 +02:00
9qeklajc
9633483fa4
prevent zero balance token
2026-06-01 22:47:09 +02:00
Bilthon
f2ef63da62
refactor(balance): remove unreachable cashu-refund-by-hash endpoint
2026-05-28 10:25:25 -05:00
9qeklajc
efb5719679
add provider field to response
2026-05-17 14:39:16 +02:00
9qeklajc
490687bb71
Merge branch 'main' into fix-provider-forwarding-upstream
2026-05-14 15:40:52 +02:00
9qeklajc
966613847e
update not found proxy
2026-05-14 15:40:49 +02:00
9qeklajc and GitHub
d030d86f9a
Merge pull request #506 from Routstr/fix-swapping
...
fix swapping
2026-05-14 14:32:39 +02:00
9qeklajc
3c13be20cb
no key creation when refund
2026-05-13 22:34:24 +02:00
9qeklajc
9d5e14903b
fix swapping
2026-05-13 21:49:03 +02:00
9qeklajc and GitHub
27ec052c17
Merge pull request #499 from Routstr/emulate-claude-token-count
...
support /message/count_tokens endpoint
2026-05-10 08:45:58 +02:00
9qeklajc and GitHub
752d4f3803
Merge pull request #496 from Routstr/fix-provider-forwarding-upstream
...
fix provder forwarded path & wrong html response
2026-05-09 14:47:35 +02:00
9qeklajc
164ed775c8
support /message/count_tokens endpoint
2026-05-09 14:43:03 +02:00
9qeklajc
9d905758ec
added page not found redirection
2026-05-09 14:07:45 +02:00
9qeklajc
6e9932e0ac
fix provder forwarded path & wrong html response
2026-05-09 12:05:51 +02:00
9qeklajc
59773e972b
configure payment
2026-05-09 00:00:18 +02:00
9qeklajc
4dbbb45240
add-missing-cache-token-to-calculation
2026-05-06 22:49:23 +02:00
9qeklajc
a7615bc827
improve gemini upstream to forward /messages endpoint correctly
2026-05-04 00:48:52 +02:00
9qeklajc
37c2bea93d
make sure to forward to the right upstream
2026-05-03 15:15:34 +02:00
9qeklajc
985e765285
fix gemini api
2026-05-02 21:24:27 +02:00
9qeklajc
a4b1330627
clean up impl. & simplify
2026-05-02 16:46:39 +02:00
9qeklajc
309bc873e6
Merge branch 'main' into litellm-integration-for-anthropic-messages-forwarding
2026-05-01 16:30:13 +02:00
9qeklajc
66421cd17f
normalize response
2026-04-28 00:44:22 +02:00
9qeklajc
8c0ac499ef
make sure to always emit sats cost
2026-04-28 00:01:27 +02:00
9qeklajc
92d581573d
test: add unit tests for litellm messages dispatch
2026-04-26 22:45:22 +02:00
9qeklajc
689a07f562
enforce-models-refresh-from-upstream
2026-04-26 21:41:38 +02:00
9qeklajc
05115c3387
add api-key history and fix race condition while topup
2026-04-22 21:50:22 +02:00
9qeklajc
9f55da9bb8
make streaming serialization more robust
2026-04-14 00:44:10 +02:00
9qeklajc
963ee04619
enforce no swap when token from primary mint
2026-04-14 00:29:54 +02:00
9qeklajc
85a1ea4b4c
add apikey refund tracking
2026-04-10 15:34:19 +02:00
9qeklajc
7da4ad3818
add sat cost to x-cashu response
2026-04-05 01:20:58 +02:00
9qeklajc
905ae67015
update tests
2026-04-01 15:11:43 +02:00
9qeklajc
6fde846be2
refund x cashu
2026-04-01 15:04:38 +02:00
9qeklajc
a833cf429e
add refund x-cashu to default refund endpoint
2026-03-29 21:22:09 +02:00
9qeklajc
b76ff62f1c
improve mint fee calculation
2026-03-23 20:58:01 +01:00
9qeklajc and GitHub
063df51ced
Merge pull request #411 from Routstr/408-fix-swap
...
fix swapping the primary mint
2026-03-18 22:17:29 +01:00
9qeklajc
42b3840df6
Merge branch 'v0.4.0' into v0.4.0-analytics
...
# Conflicts:
# routstr/core/settings.py
2026-03-18 21:43:18 +01:00
9qeklajc
901a6a9ba2
fix swapping the primary mint
2026-03-16 21:40:43 +01:00
Shroominic
e31b45fa9e
test: type dummy async client exit hook
2026-03-13 18:51:30 +08:00
Shroominic
93a368b1a2
fix(admin): handle routstr balance timeouts
2026-03-13 18:39:06 +08:00
Evan Yang
09e7f1f0bf
Increase snapshot model limit to 20
2026-03-13 15:55:29 +08:00
Evan Yang
9cd4ff5c21
Simplify analytics sharing to single snapshot with multi-window payloads
2026-03-13 15:55:29 +08:00
Evan Yang
8fc1b6484c
Add Nostr analytics snapshots and expand stats model coverage
2026-03-13 15:55:29 +08:00
Evan Yang
ce9834d7ec
fix: harden azure routing and model override mapping
2026-02-10 19:15:25 +08:00
Shroominic
b1facd58d5
rm test checking unused functions
2026-01-31 07:21:44 +08:00
Shroominic
cb36189db3
fmt
2026-01-09 17:04:09 +08:00
Shroominic
d2487f42b0
fix tests
2026-01-09 17:02:35 +08:00
Shroominic
6f00478580
fix typing issues
2025-11-28 12:59:49 +09:00