Skip to content

fix(proxy): ignore empty legacy function_call placeholders - #438

Open
u1544096979 wants to merge 1 commit into
SaladDay:mainfrom
u1544096979:fix/empty-legacy-function-call
Open

fix(proxy): ignore empty legacy function_call placeholders#438
u1544096979 wants to merge 1 commit into
SaladDay:mainfrom
u1544096979:fix/empty-legacy-function-call

Conversation

@u1544096979

Copy link
Copy Markdown

Summary

  • ignore empty legacy function_call placeholders during OpenAI Chat to Anthropic SSE conversion
  • preserve existing handling when either the legacy function name or arguments contains data
  • add a regression test for the terminal empty-object case

Tests

  • cargo test --manifest-path src-tauri/Cargo.toml empty_legacy_function_call_does_not_emit_tool_use
  • cargo test --manifest-path src-tauri/Cargo.toml legacy_function_call_stream_emits_tool_use_block_and_argument_delta
  • cargo test --manifest-path src-tauri/Cargo.toml proxy::providers::streaming::tests (21 passed)
  • live /v1/messages stream against the affected OpenAI-compatible provider: text, end_turn, and message_stop preserved; empty tool_use count is zero

Closes #437

@u1544096979
u1544096979 force-pushed the fix/empty-legacy-function-call branch from 27dd3b1 to 81d9fa1 Compare September 5, 2026 03:42
@SaladDay

SaladDay commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Please run cargo fmt from src-tauri/ and push the changes to fix the failing formatting check.

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.

fix(proxy): ignore empty legacy function_call in OpenAI-to-Anthropic streams

2 participants