Skip to content

Comments

fix: upgrade opensecret SDK to 0.2.9 for streaming tool call passthrough#17

Merged
AnthonyRonning merged 1 commit intomasterfrom
fix/streaming-tool-call-passthrough
Feb 21, 2026
Merged

fix: upgrade opensecret SDK to 0.2.9 for streaming tool call passthrough#17
AnthonyRonning merged 1 commit intomasterfrom
fix/streaming-tool-call-passthrough

Conversation

@AnthonyRonning
Copy link
Contributor

@AnthonyRonning AnthonyRonning commented Feb 21, 2026

Problem

Streaming chat completions with multiple tool calls fail with:

Stream error: API error: 0: Failed to parse chunk: invalid type: null, expected a string at line 1 column 230

This happens because the OpenAI streaming spec sends null for id, type, and function.name in subsequent tool_call delta chunks. The SDK (0.2.8) had these as required String fields.

Fix

Upgrades opensecret from 0.2.8 to 0.2.9 (SDK PR), which makes ChatCompletionChunk a transparent serde_json::Value wrapper for full JSON passthrough.

Testing

Verified against enclave.secretgpt.ai with glm-5:

Test Result
Health check Pass
List models Pass
Non-streaming completion Pass
Streaming completion Pass
Single tool call (non-streaming) Pass
Parallel tool calls (non-streaming) Pass
Streaming multi-tool calls (previously broken) Pass

Open with Devin

Summary by CodeRabbit

  • Chores
    • Updated opensecret dependency to version 0.2.9.

Upgrades the opensecret crate from 0.2.8 to 0.2.9 which makes
ChatCompletionChunk a transparent serde_json::Value wrapper. This fixes
streaming deserialization failures when LLMs send null fields in
subsequent tool_call delta chunks (e.g. multi-tool streaming with GLM-5).

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 21, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

Updated the opensecret dependency from version 0.2.8 to 0.2.9 in the Cargo.toml manifest file. This is a patch-level version bump with no other configuration or dependency changes.

Changes

Cohort / File(s) Summary
Dependency Update
Cargo.toml
Bumped opensecret SDK version from 0.2.8 to 0.2.9.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

🐰 A tiny hop, a version's bound,
From 0.2.8 to 0.2.9 we're round!
The opensecret door swings bright,
With patches fresh and code held tight.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: upgrading the opensecret SDK to fix streaming tool call passthrough issues. It's specific, concise, and directly related to the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/streaming-tool-call-passthrough

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@AnthonyRonning AnthonyRonning merged commit 38c1dd1 into master Feb 21, 2026
15 checks passed
@AnthonyRonning AnthonyRonning deleted the fix/streaming-tool-call-passthrough branch February 21, 2026 19:20
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.

1 participant