Skip to content

Conversation

@Edison-A-N
Copy link
Contributor

Problem

The outputSchema processing in SmolAgentsAdapter was inconsistent with inputSchema processing. While inputSchema correctly filters out redundant $defs after jsonref.replace_refs(), the outputSchema did not.

This inconsistency causes serious issues:

Changes

  • Updated outputSchema processing to filter out $defs key after resolving references
  • Now matches the pattern used for inputSchema processing, ensuring consistency across the codebase

@chahn
Copy link
Contributor

chahn commented Oct 23, 2025

Thanks a lot for catching this!
I initially put together the structured output/output schema support for mcpadapt and smolagents, and this change lines up nicely with how we handle the input schema.

Looks good to me!

@grll if it makes sense to you too, we should merge this in.

@grll
Copy link
Owner

grll commented Oct 24, 2025

@Edison-A-N Thanks for the fix!

@grll grll merged commit e084e6a into grll:main Oct 24, 2025
3 checks passed
@Edison-A-N Edison-A-N deleted the fix-output-schema-defs branch October 25, 2025 01:04
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.

3 participants