Commit Graph
17 Commits
Author SHA1 Message Date
Tam Nhu Tran 045fc93285 test(glmt): align thinking signature coverage 2026-06-29 12:58:38 -04:00
Sergey Galuza 37d2bae001 test(glmt): assert thinking signature is a non-empty opaque string
Add two contract tests on the public proxy path
createAnthropicProxyResponse: JSON and SSE. Anthropic requires a
thinking block's signature to be a non-empty opaque string, but ccs
currently fabricates the signature as an object via
generateThinkingSignature(), which breaks the stream against reasoning
backends.

Built [OnSteroids](https://onsteroids.ai)
2026-06-29 13:26:16 +02:00
ReWiG 2aaad43fd7 fix(proxy): forward stream_options.include_usage to OpenAI-compatible upstreams
Claude Code's status line and the session log showed 0 tokens for every
streaming response routed through the OpenAI-compatible proxy. The root
cause was that the upstream request did not include
`stream_options: { include_usage: true }`, so the provider (LiteLLM and
other OpenAI-compatible endpoints) never emitted the final SSE chunk
that carries `usage`. The proxy's stream parser was already wired to
forward that chunk into an Anthropic-shaped `message_delta` event but
had nothing to forward.

Set `stream_options.include_usage` whenever the incoming Anthropic
request is streamed. Non-streamed requests are unaffected.

Ref: https://platform.openai.com/docs/api-reference/chat-streaming
     (search 'include_usage')
2026-06-19 21:45:47 +03:00
Halil Ertekin f42aee9a20 fix: handle system messages in OpenAI proxy (#1403) 2026-05-28 22:08:07 -04:00
seilk 2c0f9c41ff test(proxy): assert tool_result image URLs stay redacted 2026-04-30 02:22:49 +09:00
seilk 83c16e216a fix(proxy): avoid leaking tool_result image URLs 2026-04-30 02:18:22 +09:00
seilk f6bb31c956 fix(proxy): stringify tool_result images for OpenAI upstreams 2026-04-30 00:55:45 +09:00
Chris Weller 1c91c46326 fix(proxy): avoid settings override and nested reasoning for openai-compat 2026-04-26 14:53:25 -06:00
Tam Nhu Tran 71deda553a fix(cliproxy): preserve adaptive thinking on opus 4.7 paths 2026-04-22 21:43:11 -04:00
Tam Nhu Tran 399f403322 fix(transformers): preserve tool ordering across proxy streams
- reject pending tool_result layouts that cannot be translated without reordering user content

- keep interleaved GLMT tool_use blocks open until finalization instead of stopping early

- cover leading/interleaved tool_result regressions and interleaved streaming tool fragments
2026-04-20 13:17:30 -04:00
Grandis SYF 889d3d89e9 fix(test): correct expected error message text 2026-04-20 13:06:00 -04:00
Grandis SYF b2a4579098 fix(proxy): update tests for tool_result+text and disconnect handler changes 2026-04-20 13:06:00 -04:00
Tam Nhu Tran ebc92194bb fix(proxy): harden Anthropic request transformation semantics
- enforce strict tool_result ordering and pairing against assistant tool_use ids
- reject tool_result image payloads that cannot map to OpenAI tool messages
- preserve raw tool schemas on the /v1/messages proxy path instead of silently tightening them
- forward Anthropic tool_choice semantics and cover adaptive routing plus upstream payload checks
2026-04-18 19:39:13 -04:00
Tam Nhu Tran 32d6bfdda7 fix(proxy): restore strict Anthropic message validation 2026-04-18 19:02:38 -04:00
Tam Nhu Tran a3407093d7 refactor(proxy): internalize sse translation and cleanup handlers 2026-04-15 01:44:01 -04:00
Tam Nhu Tran 17187c4abd feat(proxy): complete openai routing scope 2026-04-15 00:55:11 -04:00
Tam Nhu Tran 5c66c1f121 test(proxy): cover proxy lifecycle and routing 2026-04-14 19:27:19 -04:00