Skip to content

fix: accept object tool arguments in openai compat#1379

Closed
Alix-007 wants to merge 1 commit intosipeed:mainfrom
Alix-007:fix/issue-1287-tool-args-object
Closed

fix: accept object tool arguments in openai compat#1379
Alix-007 wants to merge 1 commit intosipeed:mainfrom
Alix-007:fix/issue-1287-tool-args-object

Conversation

@Alix-007
Copy link
Contributor

Summary

  • accept tool_calls.function.arguments as either a JSON string or a raw object
  • preserve the raw serialized arguments on the parsed function call
  • add regression coverage for both string and object argument payloads

Fixes #1287

Testing

  • go test ./pkg/providers/openai_compat

@CLAassistant
Copy link

CLAassistant commented Mar 11, 2026

CLA assistant check
All committers have signed the CLA.

@yinwm
Copy link
Collaborator

yinwm commented Mar 11, 2026

Closing as duplicate of #1292, which has a more complete implementation:

Both fix #1287, but #1292 is the better solution. Please refer to #1292 instead.

@yinwm yinwm closed this Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: provider go Pull requests that update go code type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Tool calling fails

3 participants