feat: expose model_version in responses for humanitarian, anonymize, and ocr schemas#374
Open
Opulencechuks wants to merge 2 commits into
Open
feat: expose model_version in responses for humanitarian, anonymize, and ocr schemas#374Opulencechuks wants to merge 2 commits into
Opulencechuks wants to merge 2 commits into
Conversation
Contributor
|
Awesome work on this! Thanks for the contribution 🚀 Merging now. |
Contributor
|
Hi 👋 Thanks for this PR! There are some merge conflicts with the current main. Could you rebase onto main and push when you have a moment? Once it's clean we'll get it merged 🚀 |
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.
Closes #272
Summary
This PR exposes the
model_versionin the response payloads for the Humanitarian verification, PII anonymization, and OCR endpoints. Prior to this change, consumers of these APIs could not determine which model version (e.g.gpt-4o-miniorllama-3.3-70b-versatile) processed their request.model_versionis resolved dynamically at runtime from settings (settings.openai_modelorsettings.groq_model) based on the active or resolved provider.Testing
The changes were verified using both schema-level unit tests and route integration tests.
Tests Run
We added new snapshot tests to pin the
model_versionfield in the expected output structure, and updated the integration test assertions to verify the value returned on the endpoints.# To run the test suite locally once the Python environment is set up: pytestScreenshots
N/A (API changes only)
Checklist