REVAI-4573: Update SDKs to support new model#67
Conversation
…tion Add unit tests verifying the deprecated submitJobUrl(String, RevAiJobOptions) rejects source_config in options and sends source_config instead of media_url. Add integration test for machine_v3 transcriber via submitJobUrl. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ead of media_url The deprecated submitJobUrl(String, RevAiJobOptions) now sends source_config instead of media_url, enabling compatibility with machine_v3 transcriber. Rejects source_config in options to prevent conflicts. Updates example to use machine_v3 and bumps version to 2.6.0. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove SubmitJobUrl_NullOptions, SubmitJobUrl_NullSourceConfig, and SubmitJobUrl_NullSourceConfigUrl tests. These tests were passing by accident — they never called mockInterceptor.setSampleResponse(), so when MockInterceptor tried to create a ResponseBody with a null string, OkHttp's Kotlin null-check threw IllegalArgumentException. The tests expected exactly that exception type, so they appeared to validate input but were actually just catching a mock infrastructure crash. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@dmtrrk same story as with the Python SDK with the CI builds. |
actions/cache v1, actions/upload-artifact v3, actions/checkout v2, and actions/setup-java v1 have been deprecated by GitHub and now cause automatic build failures. Update all to v4 and add required `distribution: temurin` parameter for setup-java. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Temurin does not distribute Java 13 (non-LTS, EOL). Replace with Java 17 (current LTS). Also make upload-artifact names unique per matrix job as required by actions/upload-artifact@v4. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dmtrrk
left a comment
There was a problem hiding this comment.
there should be v2 and v3 integration tests to be sure we are backward compatible, and v3 works properly:
- v2 integration to work with media url
- v3 integration works with the same interface
- v3 unit fails with mediaurl
| matrix: | ||
| # test against latest update of each major Java version, as well as specific updates of LTS versions: | ||
| java: [8, 11.0.x, 13 ] | ||
| java: [8, 11, 17 ] |
There was a problem hiding this comment.
not sure this is a good idea. let's keep both
Already covered. The existing
Added in this PR:
Can you clarify what you'd expect this test to verify? |
dmtrrk
left a comment
There was a problem hiding this comment.
unit tests do not contain mediaUrl + v3 scenario
Description of Work
The deprecated
submitJobUrl(String mediaUrl, RevAiJobOptions options)method was sendingmedia_urlin the JSON payload, which is not supported by the v3 transcriber (machine_v3). This PR migrates it to sendsource_configinstead, enabling compatibility with v3.What Changed
submitJobUrl(String, RevAiJobOptions)now callssetSourceConfig(mediaUrl)instead ofsetMediaUrl(mediaUrl). Rejectssource_configin options to prevent conflicts.source_confignotmedia_url). Removed 3 pre-existing false-positive validation tests.machine_v3transcriber viasubmitJobUrl.machine_v2tomachine_v3.Screenshots
Test script (
examples/TestSubmitJobUrlV3.java)Output (against local API on localhost:5000)
Additional Comments
The non-deprecated
submitJobUrl(RevAiJobOptions)is unchanged — it already sendssource_configcorrectly. Validation for that method is left to the API server.