Skip to content

refactor!: rename Capability::OUTPUT_STRUCTURED to STRUCTURED_OUTPUT #362

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

OskarStark
Copy link
Contributor

Summary

  • Renamed the capability constant OUTPUT_STRUCTURED to STRUCTURED_OUTPUT for better naming consistency
  • Changed the constant value from 'output-structured' to 'structured-output'
  • Added UPGRADE.md documentation for the breaking change

Breaking Change

This is a breaking change that requires users to update their code:

  • All references to Capability::OUTPUT_STRUCTURED must be changed to Capability::STRUCTURED_OUTPUT
  • If storing or comparing capability strings directly, update from 'output-structured' to 'structured-output'

Test plan

  • All tests pass with the renamed constant
  • Updated all references in the codebase (6 files)
  • Added upgrade documentation

🤖 Generated with Claude Code

BREAKING CHANGE: The capability constant OUTPUT_STRUCTURED has been renamed to STRUCTURED_OUTPUT for better naming consistency. Additionally, the constant value has been changed from 'output-structured' to 'structured-output'.

Migration:
- Update all references from Capability::OUTPUT_STRUCTURED to Capability::STRUCTURED_OUTPUT
- If storing/comparing capability strings directly, update from 'output-structured' to 'structured-output'

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@OskarStark OskarStark changed the title refactor\!: rename Capability::OUTPUT_STRUCTURED to STRUCTURED_OUTPUT refactor!: rename Capability::OUTPUT_STRUCTURED to STRUCTURED_OUTPUT Jun 29, 2025
@OskarStark OskarStark added the BC BREAK Backwards compatibility break label Jun 29, 2025
@OskarStark OskarStark requested a review from chr-hertel June 29, 2025 20:39
@OskarStark
Copy link
Contributor Author

It reads more natural to me

@OskarStark OskarStark changed the title refactor!: rename Capability::OUTPUT_STRUCTURED to STRUCTURED_OUTPUT refactor!: rename Capability::OUTPUT_STRUCTURED to STRUCTURED_OUTPUT Jun 29, 2025
Copy link
Member

Choose a reason for hiding this comment

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

i would for now favor to list the BC breaking PRs in the releases instead doing an upgrade guide - it's just additional work while a lot of stuff is still changing, sorry

@chr-hertel
Copy link
Member

chr-hertel commented Jun 30, 2025

Yes, i had a hard time with this - my reasoning was that all capabilities where named INPUT_* and OUTPUT_* - so from a specific angle it is now less consistent 😆

If you feel like this is in conflict to the structured output feature - we could rename it to OUTPUT_JSON ?

@OskarStark
Copy link
Contributor Author

To me structured output is the thing, people are talking about when talking about capabilities

@chr-hertel
Copy link
Member

chr-hertel commented Jun 30, 2025

yea, i feel you - it's both inconsistent - what other options do we have 🤔

what do you think about splitting into three capability classes? like InputCapability::TEXT, OutputCapability::STRUCTURED and FeatureCapability::TOOL?

it will be important in the next steps to validate the models input and output capabilities while using the chain/platform - this is why i use those fixed categories in my head - what makes it easy?

another idea, next to OUTPUT_JSON would be OUTPUT_OBJECT - it's also called ObjectResponse and not StructuredResponse - i feel like OUTPUT_STRUCTURED_OUTPUT would be too much :D

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
BC BREAK Backwards compatibility break
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants