Skip to content

fix: deduplicate GetToolSpec tool names in OpenAI adapter#1610

Open
1688mengdie wants to merge 1 commit into
GCWing:mainfrom
1688mengdie:pr/toolspec-dedup
Open

fix: deduplicate GetToolSpec tool names in OpenAI adapter#1610
1688mengdie wants to merge 1 commit into
GCWing:mainfrom
1688mengdie:pr/toolspec-dedup

Conversation

@1688mengdie

Copy link
Copy Markdown

Summary

Fix 'Tool names must be unique' API error by adding deduplication in OpenAI adapter tool conversion.

Changes

  • common.rs: Add dedup check in convert_tools_flat with HashSet
  • message_converter.rs: Add dedup check in convert_tools for defensive deduplication
  • registry.rs: Update test expectations for dedup behavior
  • materialization.rs: Minor fix

Verification

  • cargo check -p bitfun-ai-adapters
  • Duplicate tool names logged and filtered

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