Add Dialect to model providers#797
Draft
calvinmclean wants to merge 2 commits intoobot-platform:mainfrom
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a dialect metadata field to the OpenAI and Anthropic model provider configurations, declaring their response format types. The dialect field helps downstream systems (like Obot and other consumers) identify and handle provider-specific response formats. According to the PR description, this is an optional forward-compatibility enhancement that includes fallback defaults for when the field is absent.
Changes:
- Added
"dialect": "OpenAIResponses"to the OpenAI model provider metadata - Added
"dialect": "AnthropicMessages"to the Anthropic model provider metadata - Both additions are placed appropriately within their JSON metadata structures with proper comma placement
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| openai-model-provider/tool.gpt | Added dialect field identifying OpenAI's response format |
| anthropic-model-provider-go/tool.gpt | Added dialect field identifying Anthropic's response format |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
dialectfield to theproviderMetametadata for the Anthropic and OpenAI model providers."dialect": "AnthropicMessages""dialect": "OpenAIResponses"This PR is optional — Obot falls back to defaults when it is absent. However, it is recommended for full forward compatibility and consistency with additional model providers that will declare their own dialects.
Depends on obot-platform/obot#6246 and nanobot-ai/nanobot#263.