Repository navigation
feat(proxy): add Amazon Transcribe pass-through with completion-time job pricing - #41515
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
|
|
bugbot run |
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
bugbot run |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
bugbot run |
…operation from test Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
bugbot run |
…x lists Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
bugbot run |
|
bugbot run |
|
@veria-ai please review 2decf37: deleted-job pricing fallback now reads the relayed StartTranscriptionJob body, so check the eight hour maximum charge path and spend logging |
…tead of the relayed httpx body Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
@veria-ai please review 3f82479: StartTranscriptionJob pricing now reads the parsed response body before the relay closes it, and AWS JSON responses are buffered for spend logging |
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 3f82479. Configure here.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
BerriAI#41515 added the cost map entry transcribe/StartTranscriptionJob under a new litellm_provider value "transcribe" without registering that provider anywhere else, so litellm.models_by_provider had no "transcribe" key. test_models_by_provider derives its provider set from the cost map itself, so it went red on main. The user-visible half is that get_provider_models returned None for the provider, which get_known_models_from_wildcard turns into an empty list, leaving a transcribe/* key or team grant resolving to no models. Mirror the aws_polly registration: an enum member, a model set, an ingestion branch, and a models_by_provider entry. Amazon Transcribe is reached through the pass-through route rather than the Add Model form, so it joins the frozen unlisted set the Add Model drift test tracks.
TLDR
Problem this solves:
How it solves it:
POST /transcribe/{Operation}and SDK-shapedPOST /transcribe, SigV4 signed by the proxytranscribe/StartTranscriptionJobgets a cost map entry,input_cost_per_second0.0001GetTranscriptionJob, download the media file from S3 (one download at a time, capped at the 2 GiB Transcribe file-size quota), read its length with libsndfile, write spendlitellm-ownerwith the calling key's owner scope, soGetTranscriptionJobandDeleteTranscriptionJobonly answer for the key, team or user that started the job (or a proxy admin);ListTranscriptionJobsand the other account-wide operations are proxy admin onlygeneral_settings.transcribe_media_buckets, and may not setDataAccessRoleArnorJobExecutionSettings; unset means admin only. The list is editable in the Admin UI (Settings > Router Settings > General Settings) and a value saved there is picked up by the running proxy when config.yaml does not set itUser Flow
Before: a developer with a $0.001 key budget can start as many transcription jobs as they like, the budget never moves
{"TranscriptionJobName": "litellm-lit7936-proof", "LanguageCode": "en-US", "MediaFormat": "wav", "Media": {"MediaFileUri": "s3://.../gettysburg.wav"}}and get 200 with"TranscriptionJobStatus": "IN_PROGRESS""TranscriptionJobStatus": "COMPLETED"StartTranscriptionJobrow readsspend 0ContentRedactionjobs andStartMedicalTranscriptionJobAfter: the same key is charged for the audio it transcribed and the next job is refused once the budget is exceeded
transcribe_media_buckets, either in config.yaml or in the Admin UI at http://localhost:4000/ui/?page=router-settings (General Settings tab,transcribe_media_bucketsrow, comma-separated bucket names, Update). Until then a non-admin StartTranscriptionJob gets 403only a proxy admin may StartTranscriptionJob"TranscriptionJobStatus": "IN_PROGRESS""TranscriptionJobStatus": "COMPLETED"StartTranscriptionJobrow in SpendLogs readsspend 0.0018(18 rounded seconds at $0.0001) and the key's spend is 0.0018 of 0.001Budget has been exceeded! ... Current cost: 0.0018, Max budget: 0.001ContentRedactiongets 400adds a per-second surcharge LiteLLM does not price yet, StartMedicalTranscriptionJob gets 400is billed per second of audio at a rate LiteLLM does not price yet, and a StartTranscriptionJob pointing at an.mp4gets 400can only do for flac, mp3, ogg, wav; none of those jobs appear in AWSMedia.MediaFileUriorOutputBucketNamenames a bucket that is not listed, or that carries aDataAccessRoleArn, gets 403 unless the key is a proxy adminNo transcription job named ... was started through this proxy by the calling key, and its ListTranscriptionJobs gets 403; the proxy admin key can still list and read everythingRelevant issues
Affected release
Linear ticket
Resolves LIT-7936
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
uv run pytest tests/test_litellm/<your_test_file>.py -v. Leave the suites (make test-unit-*,make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more@greptileaito re-request a review after pushing changes)Delays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
Real AWS Transcribe in us-west-2 and a real Postgres, no mocks. The route does not exist on
main, so Before is the previous PR head65d0f3a0(zero-cost logging) served from a sibling worktree on port 20935, and After is the current tip served from this checkout on port 20936. Both proxies use the same config, database and AWS credentials, and the same request files; the sha256 of each fixture is printed by both arms. Each arm generates a fresh key withmax_budget 0.001, and any leftover jobs are deleted directly in AWS before the arm starts so the control leg starts clean. The 17.6 secondgettysburg.wavfixture rounds up to 18 billable seconds, so the expected charge is 18 x 0.0001 = 0.0018Fixtures
Before (65d0f3a)
Control: StartTranscriptionJob on a fresh key with max_budget 0.001
curl -s $BASE/key/generate -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{"key_alias":"lit7936-proof-before-1932","max_budget":0.001}'-> key createdcurl -s -w '\nHTTP %{http_code}\n' http://localhost:20935/transcribe/StartTranscriptionJob -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' --data-binary @start.jsoncurl -s http://localhost:20935/transcribe/GetTranscriptionJob ... --data-binary @job.jsonuntil terminal, then wait 90 s for spend to landpsql $DATABASE_URL -Ac "select model, spend from \"LiteLLM_SpendLogs\" where metadata->>'user_api_key_alias'='lit7936-proof-before-1932' order by \"startTime\""psql $DATABASE_URL -Ac "select key_alias, spend, max_budget from \"LiteLLM_VerificationToken\" where key_alias='lit7936-proof-before-1932'"curl -s -w '\nHTTP %{http_code}\n' http://localhost:20935/transcribe/DeleteTranscriptionJob ... --data-binary @job.json->HTTP 200Repeat: byte-identical StartTranscriptionJob on the same key
curl -s -w '\nHTTP %{http_code}\n' http://localhost:20935/transcribe/StartTranscriptionJob -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' --data-binary @start.jsonSurcharge class: StartTranscriptionJob with ContentRedaction
curl -s -w '\nHTTP %{http_code}\n' http://localhost:20935/transcribe/StartTranscriptionJob -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' --data-binary @start_redaction.jsonUnpriced operation class: StartMedicalTranscriptionJob
curl -s -w '\nHTTP %{http_code}\n' http://localhost:20935/transcribe/StartMedicalTranscriptionJob -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' --data-binary @start_medical.jsonUnmeasurable media class: StartTranscriptionJob pointing at an mp4
curl -s -w '\nHTTP %{http_code}\n' http://localhost:20935/transcribe/StartTranscriptionJob -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' --data-binary @start_mp4.jsonselect model, spend from "LiteLLM_SpendLogs" where metadata->>'user_api_key_alias'='lit7936-proof-before-mp4-2107'-> one row,spend 0After (3f82479, the current tip, served from this checkout after a restart on that commit; its config.yaml lists
litellm-lit7936-transcribe-qaandlitellm-lit7936.transcribe.qaintranscribe_media_buckets)Control: StartTranscriptionJob on a fresh key with max_budget 0.001
curl -s $BASE/key/generate -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{"key_alias":"lit7936-proof-after-0245","max_budget":0.001}'-> key createdcurl -s -w '\nHTTP %{http_code}\n' http://localhost:20936/transcribe/StartTranscriptionJob -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' --data-binary @start.jsonThe
Tagsmember was added by the proxy;start.jsonhas nonecurl -s http://localhost:20936/transcribe/GetTranscriptionJob ... --data-binary @job.jsonuntil terminal, then wait 90 s for spend to landpsql $DATABASE_URL -Ac "select model, spend from \"LiteLLM_SpendLogs\" where metadata->>'user_api_key_alias'='lit7936-proof-after-0245' order by \"startTime\""psql $DATABASE_URL -Ac "select key_alias, spend, max_budget from \"LiteLLM_VerificationToken\" where key_alias='lit7936-proof-after-0245'"curl -s -w '\nHTTP %{http_code}\n' http://localhost:20936/transcribe/DeleteTranscriptionJob ... --data-binary @job.jsonRepeat: byte-identical StartTranscriptionJob on the same key
curl -s -w '\nHTTP %{http_code}\n' http://localhost:20936/transcribe/StartTranscriptionJob -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' --data-binary @start.jsonSurcharge class: StartTranscriptionJob with ContentRedaction
On the exhausted key this leg returns the same 429 budget error, so this and the next two legs are shown on a fresh key
lit7936-proof-gates-0123withmax_budget 0.001and spend 0, so the route gate answers rather than the budget check. After the three legsselect model, spend from "LiteLLM_SpendLogs" where metadata->>'user_api_key_alias'='lit7936-proof-gates-0123'returns(0 rows): a refused job writes no spend rowcurl -s -w '\nHTTP %{http_code}\n' http://localhost:20936/transcribe/StartTranscriptionJob -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' --data-binary @start_redaction.jsonaws transcribe list-transcription-jobs --region us-west-2 --job-name-contains litellm-lit7936-proof-redaction --query 'TranscriptionJobSummaries[].TranscriptionJobName'->[]Unpriced operation class: StartMedicalTranscriptionJob
curl -s -w '\nHTTP %{http_code}\n' http://localhost:20936/transcribe/StartMedicalTranscriptionJob -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' --data-binary @start_medical.jsonaws transcribe list-medical-transcription-jobs --region us-west-2 --job-name-contains litellm-lit7936-proof-medical --query 'MedicalTranscriptionJobSummaries[].MedicalTranscriptionJobName'->[]Unmeasurable media class: StartTranscriptionJob pointing at an mp4
curl -s -w '\nHTTP %{http_code}\n' http://localhost:20936/transcribe/StartTranscriptionJob -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' --data-binary @start_mp4.jsonaws transcribe list-transcription-jobs --region us-west-2 --job-name-contains litellm-lit7936-proof --query 'TranscriptionJobSummaries[].TranscriptionJobName'->["litellm-lit7936-proof"], only the control job exists (the dotted-bucket job below had not been started yet). The request never reached AWS: the refusal text is LiteLLM's, not AWS's, and the mp4 leg on Before got AWS'sBadRequestExceptioninsteadDotted bucket name: StartTranscriptionJob with media in
s3://litellm-lit7936.transcribe.qa/Bugbot flagged that a bucket with dots in its name cannot be read through the virtual-hosted S3 hostname (its TLS certificate is a single-level wildcard), so the duration read failed and the job was charged the maximum. Reproduced on 16500bd (key
lit7936-proof-dotted-before-2151): the job completed, the proxy log had threecertificate verify failederrors againstlitellm-lit7936.transcribe.qa.s3.us-west-2.amazonaws.com, and the spend row wastranscribe/StartTranscriptionJob|2.88. Same fixture on the current tip (fresh keylit7936-proof-dotted-after-0123, no budget):curl -s -w '\nHTTP %{http_code}\n' http://localhost:20936/transcribe/StartTranscriptionJob -H 'Authorization: Bearer $KEY' -H 'Content-Type: application/json' --data-binary @start_dotted.jsonGetTranscriptionJobtoCOMPLETED, wait for the spend write, thenpsql $DATABASE_URL -Ac "select model, spend from \"LiteLLM_SpendLogs\" where metadata->>'user_api_key_alias'='lit7936-proof-dotted-after-0123' and model like '%Start%'"grep -c 'certificate verify failed'on the proxy log ->0, and the job is charged the same 18 s as the plain bucket. The path-style URLhttps://s3.us-west-2.amazonaws.com/litellm-lit7936.transcribe.qa/gettysburg.wavthat dotted names resolve to is asserted by unit testsJob ownership: two virtual keys and the proxy admin key
Veria flagged that any key could read, list or delete any job in the AWS account. Captured on the current tip. Two fresh keys with no team and
max_budget 0.01(lit7936-owner-a-012443as KEY_A,lit7936-owner-b-012443as KEY_B),sk-1234is the proxy admin keyThe job couldn't be deleted. Make sure it exists and isn't pending.because the job was still runningselect model, spend from "LiteLLM_SpendLogs" where metadata->>'user_api_key_alias'='lit7936-owner-a-012443'->transcribe/StartTranscriptionJob|0.0018, key spend0.0018of0.01Storage allowlist set from the Admin UI: media and output buckets for non-admin keys
Bugbot flagged that any virtual key could point a job at any S3 object the proxy's credentials can read and write the transcript to any bucket they can write. Captured on the current tip served from this checkout with a second config.yaml that has no
transcribe_media_buckets(onlymaster_key,database_url,store_model_in_db: true), so the value comes from the database the Admin UI writes to./config/field/updateand/config/field/deleteare the calls the General Settings table makes on Update and Reset; the same rows appear at http://localhost:4000/ui/?page=router-settings under the General Settings tab. Non-admin keylit7936-ui-0107withmax_budget 0.01Noneand the non-admin key is refusedWhich handler branch each leg exercised: the control leg goes through
transcribe_proxy_route(gate passes), the pass-through success path, and the completion-time pricing task (poll toCOMPLETED,Media.MediaFileUridownloaded from S3 with the proxy's SigV4, libsndfile length 17.58 s rounded to 18 s). The repeat leg is refused by the existing key budget check before the route body runs. The ContentRedaction leg is refused by the surcharge branch of the route gate, the medical leg by the unpriced-operation branch, the mp4 leg by the media-format branch, all before SigV4 signing. The storage legs exercisetranscribe_storage_refusal(unset list, unlisted media bucket, unlisted output bucket, caller-supplied role), which runs before the ownership transformation and before signing. The ownership legs exercisetranscribe_owned_start_request(tag added, caller-supplied tag refused),transcribe_job_access_refusal(owner match, non-owner 404, admin bypass) andtranscribe_admin_only_refusal(403 for a virtual key, pass for the admin). TheFAILEDjob branch, the polling-timeout branch, the unreadable-media branch, the rewritten-media branch, the non-AWS-host branch and the fail-closed lookup-error branch are covered by unit tests only; they were not driven livePricing source, read from the raw AWS Price List offer file on 2026-09-17 (
https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/transcribe/current/index.json, publication 2026-09-11): every*-TranscribeAudiousage type is0.0001000000USD persecondfrom range 0, in all 26 regions listed.*-MedicalTranscribeAudiois 0.00125,*-CallAnalyticsTranscribeAudio0.0005,*-RedactionTranscribeAudioadds 0.00004 and*-ToxicityDetectionTranscribeAudioadds 0.00006, which is why those classes are refused rather than priced at the standard rateType
New Feature
Caveats (if any)
Medium
rpm_limiton the key bounds that windowLow
s3:GetObjecton the bucket inMedia.MediaFileUrito read the duration; without it the job is charged the maximum. Buckets with dots in their name are read through the region's path-style endpoint, plain names through the virtual-hosted oneTRANSCRIBE_MEDIA_DOWNLOAD_CONCURRENCY) and stop atTRANSCRIBE_MAX_MEDIA_BYTES(2 GiB, the Transcribe file-size quota), checked againstContent-Lengthbefore the transfer and against bytes written during it; a larger object is charged the eight hour maximum instead of being read. The temporary file can exceed the cap by at most one streamed chunk before the download is cut offflac,mp3,ogg,wav) is accepted;mp4,m4a,webmandamrjobs are refused with a 400 rather than forwarded unpricedGetTranscriptionJobto echo theMedia.MediaFileUrithe job was started with; a response without it is charged the maximumStartMedicalScribeJobandStartCallAnalyticsJobwere gated from the same allowlist asStartMedicalTranscriptionJobbut only the medical transcription job was driven livetranscribe_media_bucketsis a plain bucket allowlist: every non-admin key shares the same set of buckets, and within a listed bucket any object key may be named. The setting is read from the running proxy'sgeneral_settings, so a value saved in the Admin UI takes effect on the next DB config reload (about 10 s to a minute), and config.yaml wins when it sets the fieldget_primary_resource_owner_scopeuses elsewhere), so every key in a team can read and delete the team's jobs. Jobs started outside the proxy, or by an earlier revision of this branch, carry no tag and answer 404 to non-admin keysGetTranscriptionJobandDeleteTranscriptionJobcosts one extraGetTranscriptionJobcall to AWS per request; a failure of that lookup is treated as not found (fail closed)Last-Modified(whole seconds) with the jobCreationTimeallowingTRANSCRIBE_MEDIA_LAST_MODIFIED_TOLERANCE_SECONDS(1 s) of slack, so an object overwritten within the same second the job was created is still measuredTaxonomy audit of the diff (D, P, Z auth; E, AA spend; F, U, V, W, X provider; T tests; H lint). Confirmed and fixed: D1/Z3, any key could read, list or delete every Transcribe job in the AWS account, now scoped by an owner tag the proxy writes and the caller cannot supply, with account-wide operations admin only; D4/Z2, an AWS error during the ownership lookup answers 404 rather than widening access, and the refusal is computed before SigV4 signing so an unauthorised body is never signed; P2, the owner scope is resolved with the existing
get_primary_resource_owner_scopeanduser_can_access_resource_ownerhelpers rather than a new comparison; E1/AA1, billable job persisted at 0 cost, now priced at completion with a fail-closed maximum; F3, sibling billable operations (StartMedicalTranscriptionJob,StartMedicalScribeJob,StartCallAnalyticsJob) and the surcharge members onStartTranscriptionJobare refused rather than silently priced at the wrong rate; E5/X1, the cost map entry is validated with a strict Pydantic model so a missing or non-numeric rate refuses the job instead of falling back to 0; T1, every pricing and gating test fails on the previous head (mutation checked withcprestore andcmp -s); E2, a job whose media cannot be measured is refused before submission when the format is known up front, and charged the eight hour maximum when the measurement fails after the fact, so inability to price never becomes a zero charge; AA3, a caller who points a job at a very large S3 object cannot fill the worker's disk, since downloads are bounded by size before and during streaming and serialised through a semaphore, covered by tests onwrite_media_within_limit. V1, the media URL comes from the caller's request, so the S3 signature is only computed for hosts under the proxy region's AWS DNS suffix and any other host is treated as unreadable and charged the maximum, covered by a test with a userinfo-spoofed host; rechecked after the dotted-bucket fix, the path-style hosts3.<region>.<dns suffix>is still inside the partition andtest_dotted_bucket_maps_to_the_regional_path_style_endpointpins it. Z1/X1, the storage allowlist treats an unset, empty or malformedtranscribe_media_bucketsas nothing granted for non-admin keys rather than falling back to allow all, validated with a strictTypeAdapter; D3, the allowlist is bypassed only for the proxy admin role resolved fromUserAPIKeyAuth, and the caller cannot widen it by passingDataAccessRoleArnorJobExecutionSettings; L1/A5, the Admin UI edits the setting through the existing/config/field/updateand/config/listendpoints (newListfield type rendered as comma-separated text, sent as a JSON array), and the running proxy reads the DB value intogeneral_settingson config reload unless config.yaml owns the key, covered bytest_ProxyConfig__update_general_settings_applies_db_transcribe_media_bucketsand its YAML precedence sibling. H8, the new Pydantic field lives in thegeneral_settingsJSON column, so no Prisma column is needed; H7, the prebuilt UI bundle underlitellm/proxy/_experimental/outis refreshed onmainby the periodicchore: update Next.js build artifactscommits rather than on feature PRs, andschema.d.tsplus the OpenAPI snapshot were regenerated withnpm run gen:apiandpython -m litellm.proxy._lazy_openapi_snapshot. Judged not applicable: W1, the request body is parsed once and passed read-only asMapping, headers areMappingProxyType; U/X on the success path, pricing is scheduled only forstatus < 400responses (existing pass-through behaviour) so aConflictExceptionon job start is never charged; H, noOptional, no baredict/Any, constants live inconstants.py, no docs in the source repo (docs are in BerriAI/litellm-docs#1506), no new source comments beyond tool-directed suppressionsDependents of the changed shared code, checked live on 393d084 and again on the current tip 3f82479 for the Transcribe control leg above (the tip differs from 393d084 in the dashboard General Settings component, where emptying a List row and clicking Update now calls
/config/field/deletelike a Select reset, covered bygeneral_settings.integration.test.tsx; in the pricing handler, where the fallback record for a job that is deleted before polling reaches a terminal status is parsed from theStartTranscriptionJobbody the success handler already holds, because the shared pass-through success path always passesresult=""and the previous revision'shttpx_response.textraiseshttpx.ResponseNotReadonce the relay has streamed and closed the response, so such jobs were charged the eight hour maximum instead of their media length; and in_should_buffer_passthrough_response, which now buffersapplication/x-amz-json-1.1bodies likeapplication/jsonso the AWS JSON protocol responses reach spend logging parsed, while jsonl and octet-stream bodies are still relayed chunk by chunk (test_pass_through_request_relays_non_json_body_without_buffering).test_pass_through_success_handler_prices_a_relayed_start_response_from_its_parsed_bodydrives the real success handler with a streamed and closedhttpx.Responseand fails on the previous revision, andtest_pass_through_request_json_response_stays_buffered_for_logging[application/x-amz-json-1.1]fails without the buffering change):_resolve_comprehend_medical_regionwas renamed to_resolve_aws_passthrough_regionwith an unchanged body, andPassThroughEndpointLogging.__init__gained two optional injected dependencies (the Transcribe handler and the log dispatch callable); both are only reached bycomprehend_medical_proxy_routeand the three zero-argument constructors.POST /comprehendmedical/DetectEntitiesV2on the same text returned 200 with the same entities and wrote onecomprehendmedical/DetectEntitiesV2|pass_through_endpoint|0.01spend row on both proxies, so the sibling pass-through and its logging path are unchanged. The new cost map entry uses alitellm_providerthat is not inLlmProviders, likeagentcore,tavilyand about twenty others;litellm.get_model_info("transcribe/StartTranscriptionJob")returns the rate andGET /public/litellm_model_cost_mapserves it. No untested dependent was left unexercisedFinal Attestation
ran /live-pr-risk and found no regressions/backward incompatible risks
Note
High Risk
Introduces AWS credential passthrough, S3 reads for pricing, and security-sensitive job/bucket scoping plus deferred spend that affects budgets; misconfiguration could over-charge or block legitimate jobs.
Overview
Adds Amazon Transcribe as a SigV4 proxy pass-through at
POST /transcribeandPOST /transcribe/{operation}(plus routing/OpenAPI/ingress wiring), forwarding AWS JSON 1.1 calls on the proxy’s credentials.Billing charges
StartTranscriptionJobafter the job finishes: pollGetTranscriptionJob, download the referenced S3 media (bounded size/concurrency), measure duration with libsndfile for supported formats, and write spend from a newtranscribe/StartTranscriptionJobcost-map rate. Unpriced job types, surcharge features, and non-measurable media are rejected before AWS; pricing failures fail closed to the 8-hour maximum.Access control tags jobs with
litellm-owner, restricts get/delete to the starter (or admin), limits account-wide APIs to proxy admins, and gates non-admin media/output togeneral_settings.transcribe_media_buckets(editable in Router Settings as a List). Pass-through buffering now treatsapplication/x-amz-json*like JSON so Transcribe responses can be logged.Reviewed by Cursor Bugbot for commit 3f82479. Bugbot is set up for automated code reviews on this repo. Configure here.
Link to Devin session: https://app.devin.ai/sessions/384cb1b5491d432b9475a8ff09fcc9fc
Open in Devin Desktop: https://app.devin.ai/desktop/session/384cb1b5491d432b9475a8ff09fcc9fc?variant=devin
Requested by: @yassin-berriai