REVAI-4573: Update SDKs to support new model#124
Open
Conversation
TDD red phase: tests expect source_config instead of media_url in STT payload, verbatim=False to be included, and media_url/source_config conflict to raise ValueError. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- submit_job_url now sends source_config: {url: media_url} instead of
media_url directly, enabling v3 transcriber (machine_v3) support
- Raise ValueError when both media_url and source_config are provided
- Fix verbatim to be sent when False (was skipped due to falsy check)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
|
@dmtrrk the CI builds are failing. There is some dependency problem with the setup. Should we address that as well? |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
yes, looks like this should be a good time to update the workflow. let's just call pytest direwctly, e.g. |
The pytest-runner package and setup.py's tests_require/test_suite options are deprecated and incompatible with newer setuptools versions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dmtrrk
reviewed
Feb 20, 2026
| if verbatim: | ||
| if verbatim is not None: | ||
| payload['verbatim'] = verbatim | ||
| if rush: |
Contributor
There was a problem hiding this comment.
it looks like we need to make this fix to all boolean options
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.
Description of Work
Migrates the Python SDK's speech-to-text
submit_job_urlto usesource_configinstead ofmedia_url, enabling support for the v3 transcriber (machine_v3). Also fixes theverbatimoption to be sent when explicitly set toFalse(previously skipped due to a falsy check).What Changed
src/rev_ai/apiclient.py—_create_job_options_payload:media_urlparam now buildssource_config: {url: media_url}in the payload instead of sendingmedia_urldirectlyValueErrorif bothmedia_urlandsource_configare providedif verbatim:→if verbatim is not None:soverbatim=Falseis correctly sent to the APImedia_urltosource_configin job, summarization, and translation testsmedia_url/source_configconflict,verbatim=True,verbatim=False,verbatim=NoneScreenshots
Integration test script (
test_source_config_migration.py)Test run output (against local API on localhost:5000)
Additional Comments
Changes are scoped to the speech-to-text API client only (
RevAiAPIClient). TheGenericApiClientused by language identification, sentiment analysis, and topic extraction clients is untouched.