fix: enable structured outputs for chat models#18
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR enables structured outputs support for GitHub Models chat models by adding the supportsStructuredOutputs: true configuration option to the base options.
Key Changes
- Added
supportsStructuredOutputs: trueto the base configuration for GitHub Models chat models - Added test coverage to verify the structured outputs configuration is properly set
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/provider.ts | Added supportsStructuredOutputs: true to the base options configuration |
| src/provider.test.ts | Added test to verify structured outputs are enabled for chat models |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
maraisr
left a comment
There was a problem hiding this comment.
Thank you so much 🙏 there may be some models that do not support structuredOutputs. I do wonder if there is a way to use something similar to https://github.com/github/models-ai-sdk/blob/main/script/sync-model-id.ts to pull this information too, and to default to true as youre doing.
|
I had a version baked into that with a call like: and just looped through the models. but it took forever and, to be completely honest, I actually have no idea what the rate limits and usage limits actually are for the free GitHub Models. Another thought: we could make it configurable at least as a providerOption or something so a consumer can at least always pass it in themselves but if the model doesn't support it, there's not really anything you can do anyway. |
resolves #16