Skip to content

feat(asr): warn when a transcription is sent without a model - #208

Merged
lumpinif merged 4 commits into
mainfrom
feat/asr-no-model-notice
Dec 3, 2026
Merged

lumpinif merged 4 commits into
mainfrom
feat/asr-no-model-notice

Conversation

@lumpinif

@lumpinif lumpinif commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

A transcription that names no model runs on the API's default model: transcribe-1 until it is retired on December 31, 2026. After that date, such requests are served and billed as transcribe-2-pro, and transcripts can change (speaker markers, audio-event tags). Until now only a request that named transcribe-1 was warned.

Before After
asr.transcribe() with no model (no argument, no model header in request_options or on your httpx client) no notice a FutureWarning: "No speech-to-text model was specified, so this request runs on the API's default model. The default is 'transcribe-1' until it is retired on December 31, 2026. After that date, requests without a model are served by 'transcribe-2-pro' and billed as 'transcribe-2-pro', and transcripts can include speaker markers and audio-event tags. Specify a model to choose it yourself, for example 'transcribe-2-pro'."
asr.transcribe() with a model no notice no notice
asr.transcribe(model="transcribe-1") its own FutureWarning unchanged
  • The warning goes through Python's warnings filters like the SDK's other deprecation warnings: with the default filters it is shown once per calling line; ignore hides it; error raises it on every such call.
  • Which model counts is decided in the order httpx applies headers: the model argument, then a model header in request_options, then one on your httpx client. An empty value counts as no model.
  • The default model, the requests, and realtime transcription (asr.stream_websocket(), which sends transcribe-stream-1) are unchanged. The text is the same in the other Fish Audio SDKs.

To silence it: pass a model, for example model="transcribe-2-pro", or set a model header. Write the model ID exactly.

Known limit: a model that only an httpx request hook or auth flow adds is not seen, so such a request still gets the warning; with warnings turned into errors that call raises, so pass model in the call.

Verification: new tests fail without the change: sync and async warn at the caller's line with the exact text; under an error filter the first and the second call raise and nothing is sent; a call after an ignore block still warns; model="" cases; a named transcribe-1 keeps its own warning; a model given as the argument, in request_options or on the httpx client silences it. Unit suite on Python 3.9 (httpx-ws 0.7.2) and 3.12 (httpx-ws 0.10.0); lint, format and type check clean. Against the live API: a warning on a call without a model, none with a model, async the same.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

A transcription with no model runs on the API default, transcribe-1, which
retires on 2026-12-31; after that such requests are served and billed as
transcribe-2-pro and transcripts can change. Only a named transcribe-1
warned. A request that carries no model (no argument, no model header in
request_options or on the httpx client) now emits a FutureWarning, once per
process, with the same text as the other Fish Audio SDKs. Passing any model
silences it. The default model, the named-transcribe-1 notice and the
requests themselves are unchanged.
…ement

The notice said a request without a model runs on 'transcribe-1', which
is false for a request sent after 2026-12-31. It now says the request
runs on the API's default model, which is 'transcribe-1' until it is
retired, and keeps the rest of the common text shared with the other
Fish Audio SDKs. The README sentence and the code comment say the same.
…del is none

The notice was given once per process through a module flag and a lock.
That broke the caller's warning filters: under an "error" filter the first
call raised and a retry went through, a call under "ignore" used the
notice up, and a forked child could block on a lock held in the parent.
It is now a plain FutureWarning, as for a named deprecated model, so the
default filter shows it once per calling line, "error" raises on every
call before anything is sent, and "ignore" hides only what it covers.

The model the request sends is decided as httpx merges it: the argument,
then a model header in request_options, then the httpx client's own
header, each skipped only when absent. An empty value then means no model.
Before, model="" warned only when the client had no model header,
although the request sent the same empty header either way.
Copilot AI lite review requested due to automatic review settings December 3, 2026 03:52
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-12-03T03:52:13.679273Z
We couldn’t complete this review. Comment @codex review to try again.
1641e98 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Dec 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 28 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1dc0511f-1ce4-4e9e-ae39-fd361dd62354
Commits

Reviewing files that changed from the base of the PR and between 1ff9170 and 1641e98.

Files selected for processing: 4

  • README.md
  • src/fishaudio/resources/asr.py
  • src/fishaudio/types/shared.py
  • tests/unit/test_deprecated_models.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@codecov

codecov Bot commented Dec 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/fishaudio/resources/asr.py 100.00% <100.00%> (ø)
src/fishaudio/types/shared.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain, and the changes include coverage for warning behavior, model precedence, and async cases.

No open issues 🎉

What changed in this PR

Adds FutureWarning notifications for ASR requests without an explicitly resolved model while preserving existing model-specific warnings.

Changes:

  • Detects model precedence across arguments, request options, and client headers.
  • Adds sync/async warning behavior and comprehensive tests.
  • Documents the warning and model-selection guidance.
File Description
tests/​unit/​test_deprecated_models.py Tests warning behavior, filtering, precedence, and async transcription cases.
src/​fishaudio/​types/​shared.py Defines the no-model warning message and helper behavior.
src/​fishaudio/​resources/​asr.py Resolves the effective model and emits warnings for model-less transcription requests.
README.md Documents ASR default-model warnings and model-selection guidance.

Review effort: Lite

@lumpinif
lumpinif merged commit 8784f88 into main Dec 3, 2026
28 checks passed
@lumpinif
lumpinif deleted the feat/asr-no-model-notice branch December 3, 2026 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants