REVAI-4573: Update SDKs to support new model#384
Open
Conversation
This test currently fails with 400 because submitJobUrl sends media_url which is not supported by the v3 transcriber. It will pass once we migrate to source_config. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two failing tests: - submitJobUrl should send source_config instead of media_url - submitJobUrl should throw when options contain source_config Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- submitJobUrl now sends source_config: { url: mediaUrl } instead of
media_url, enabling support for the machine_v3 transcriber
- Add validation: throw error if options already contain source_config
- Update existing unit test assertions accordingly
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Break long error message in submitJobUrl across multiple lines - Break long assertion string in unit test - Replace fake URL with existing mediaUrl constant to avoid linkChecker DNS resolution failure Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
submitJobUrlfrom sendingmedia_urltosource_config, enabling support for themachine_v3transcriber.What Changed
src/api-client.ts:submitJobUrlnow buildssource_config: { url: mediaUrl }instead ofmedia_url: mediaUrl. Added validation that throws if the caller also passessource_configin options (conflicting with themediaUrlparameter).test/unit/api-client/api-client.submit.spec.ts: Updated all existingsubmitJobUrlassertions frommedia_urltosource_config. Added 2 new tests: one verifying thesource_configpayload shape, one verifying the conflict error.test/integration/test/job-v3.test.js: New integration test that submits a job viasubmitJobUrlwithtranscriber: 'machine_v3'and verifies success.Screenshots
Test script (
examples/submit_job_url_v3.js)Output (local API)
Job was accepted by the API (no 400 error) and is processing. Previously this would fail with
media_url is not supported for machine_v3 transcriber. Use source_config instead.Questions
submitJobUrlis marked@deprecated(predating this PR) with the message "Use submitJob and provide a source config to the job options." Now thatsubmitJobUrlinternally usessource_config, it works correctly with all transcribers includingmachine_v3. Should we removesubmitJobUrlentirely in a future release, or remove the deprecation notice since it now behaves correctly? If we keep the deprecation, what is the concrete condition/timeline for actually removing it?Additional Comments
If you have any additional comments or notes for reviewers, please add them here.