Skip to content

Multi provider response formats#505

Merged
20001LastOrder merged 3 commits intomainfrom
feat/multi-provider-response-formats
Nov 17, 2025
Merged

Multi provider response formats#505
20001LastOrder merged 3 commits intomainfrom
feat/multi-provider-response-formats

Conversation

@Eyobyb
Copy link
Collaborator

@Eyobyb Eyobyb commented Nov 7, 2025

Add directions for contributors. For example, do developers need to run poetry install after picking up these changes?

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Maintenance
  • New release

Related issues

Mention related GitHub and Linear issues. E.g. Closes #xxx or Fixes #xxx. Otherwise delete this section.

Checklists

To speed up the review process, please follow these checklists:

Development

  • The Pull Request is small and focused on one topic
  • Lint rules pass locally (make format && make lint)
  • The code changed/added as part of this pull request has been covered with tests
  • All tests related to the changed code pass in development (make test)
  • The changes generate no new warnings (or explain any new warnings and why they're ok)
  • Commit messages are detailed
  • Changed code is self-explanatory and/or I added comments
  • I updated the documentation (docstrings, /docs)
    See the testing guidelines for help on tests, especially those involving web services.

Code review

  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached.
  • I have performed a self-review of my code
  • Issue from task tracker has a link to this pull request

💔 Thank you for submitting a pull request!

…plate class

- Added methods to detect LLM provider based on the _llm_type attribute and class name.
- Implemented provider-specific response formatting for OpenAI, Anthropic, Google, and Cohere.
- Enhanced the format_response_format_for_provider method to return appropriate formats based on detected provider.
- Updated tests to cover new functionality, including provider detection and response formatting for various LLMs.
- Simplified the handling of optional fields by removing the explicit mention of default values in comments.
- Updated comments for clarity regarding required and optional fields in the Pydantic model definition.
Copy link
Collaborator

@20001LastOrder 20001LastOrder left a comment

Choose a reason for hiding this comment

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

Thanks for submitting the PR. I think it generally looks good, only a small change is needed.

Copy link
Collaborator

@20001LastOrder 20001LastOrder left a comment

Choose a reason for hiding this comment

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

It seems the test failure is not related to this PR. A separate PR will be created for this.

@20001LastOrder 20001LastOrder merged commit 28ffd8c into main Nov 17, 2025
3 of 16 checks passed
@20001LastOrder 20001LastOrder deleted the feat/multi-provider-response-formats branch November 17, 2025 20:13
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.

2 participants