Skip to content

Use Claude Code, Codex, VSCode, Pi, and OpenCode (and 6 other harnesses) for free (1.3B+ free tokens) from your terminal, app, IDE, or phone, and now from the browser with native browser sessions (multi-harness + multi-model) like OpenClaw (voice supported + ToS friendly)

Python

Include NVIDIA NIM voice support by default (#1893)

Ali Khokhar5e0c1798f1ed
diff --git a/README.md b/README.md
index 114287d4..8125c497 100644
--- a/README.md
+++ b/README.md
@@ -27,7 +27,7 @@
- **54 ToS-friendly providers. 1.3B+ free tokens every month.** Use free, paid, subscription, and local models from one searchable UI without putting your account at risk. FCC follows provider terms and removes integrations if they stop being allowed.
- **10 coding agents. One model catalog.** Run [Claude Code](https://code.claude.com/docs/en/overview), [Codex](https://github.com/openai/codex), [Pi](https://github.com/earendil-works/pi), [OpenCode](https://github.com/anomalyco/opencode), [Cline](https://github.com/cline/cline), [Hermes](https://github.com/NousResearch/hermes-agent), [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness), [Grok Build](https://github.com/xai-org/grok-build), [Muse Code](https://research.meta.ai/blog/introducing-muse-code-and-muse-spark-1-2/), or [Aider](https://aider.chat/) with your FCC models.
-- **Keep coding through provider outages.** After retries are exhausted, FCC automatically tries your next configured model without making you restart the turn—across every client.
+- **Keep coding through provider outages.** After retries are exhausted, FCC automatically tries your next configured model without making you restart the turn. This works across every client.
- **Up to 90% fewer terminal-output tokens.** Optional [RTK](https://github.com/rtk-ai/rtk) filters common command output, while five FCC optimizations handle quota probes, command-prefix detection, titles, suggestions, and filepaths without calling a provider.
- **Native Code sessions in your browser.** Choose a folder and run Codex in the browser with real-time and background support. Freely switch providers/models in the same session. Support for switching harnesses in the same session coming soon!
- **Terminal, desktop, IDE, or phone.** Work through native launchers, [VS Code](https://code.visualstudio.com/), [Codex App](https://learn.chatgpt.com/docs/app), [JetBrains](https://www.jetbrains.com/), [Discord](https://discord.com/), or [Telegram](https://telegram.org/).
@@ -131,15 +131,13 @@ OpenCode 2:
fcc-opencode
```
-To upgrade from OpenCode 1, rerun the FCC installer with OpenCode selected. It
-upgrades the native installation in `~/.opencode/bin`; for npm or other package
-managers, follow [OpenCode's migration instructions](https://opencode.ai/v2/docs/migrate-v1/)
+To upgrade from OpenCode 1, close OpenCode and rerun the FCC installer with
+OpenCode selected. For npm or other package-manager installations, follow
+[OpenCode's migration instructions](https://opencode.ai/v2/docs/migrate-v1/)
first. For npm v1, run `npm uninstall -g opencode-ai`, then rerun the FCC installer.
-Close OpenCode before upgrading. OpenCode manages its own data upgrades.
-RTK integration is temporarily unavailable for OpenCode 2. The installer saves
-the recognized old RTK plugin outside the plugin directory; customized plugins
-need manual migration. RTK continues to work with the other supported agents.
+RTK integration is temporarily unavailable for OpenCode 2. RTK continues to work
+with the other supported agents.
Use `fcc-opencode` for coding and sessions. Use plain `opencode` for commands
such as upgrades, service management, ACP, and MCP setup.
@@ -270,26 +268,23 @@ from more than one provider before succeeding.
and finish signing in through your browser. Restart an already-running agent after connecting.
- OpenAI API uses a separate Platform API key. Enter it under
**Providers → Cloud providers → OpenAI API → Configure**. The model list may
- include IDs that cannot handle coding requests; choose a text-generation model.
+ include IDs that cannot handle coding requests. Choose a text-generation model.
- GitHub Copilot uses your signed-in GitHub account and subscription. Install
[Copilot CLI 1.0.83](https://github.com/github/copilot-cli/releases/tag/v1.0.83)
on PATH, then choose **Providers → OAuth providers → GitHub Copilot → Connect**.
- FCC reuses the native profile or shows a GitHub device code when sign-in is needed.
- You can also sign in first with `copilot login --device-code`. Select a concrete
- `github_copilot/<model-id>` from the discovered list; available models and quotas
- depend on your subscription and organization policies. Restart an already-running
- agent after connecting. Disconnect stops FCC use and leaves the native login intact.
- FCC pins its SDK and CLI compatibility because direct endpoint access is experimental.
+ Finish signing in, then select a `github_copilot/<model-id>` from the model picker.
+ Available models and quotas depend on your subscription and organization policies.
+ Restart an already-running agent after connecting.
- Azure OpenAI uses the deployment names from your resource. Set
`AZURE_OPENAI_BASE_URL` to its complete v1 endpoint, such as
`https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/`, and select a
deployment that supports Chat Completions. Enter the deployment name as a
custom model slug if it does not appear in the model dropdown.
- Mistral Codestral uses a separate key from Mistral La Plateforme.
-- Kimi Code subscription keys use `kimi_code/`; Kimi API credit keys use
+- Kimi Code subscription keys use `kimi_code/`. Kimi API credit keys use
`kimi/`. Kimi Code plans are for personal interactive coding-agent use under
[Kimi's community guidelines](https://www.kimi.com/code/docs/en/kimi-code/community-guidelines.html).
-- QwenCloud Coding Plan keys use `qwencloud_coding/`; QwenCloud Token Plan keys
+- QwenCloud Coding Plan keys use `qwencloud_coding/`. QwenCloud Token Plan keys
use `qwencloud/`. The keys and endpoints are not interchangeable. Coding Plan
is for local, personal, interactive coding-agent use under the
[Coding Plan terms](https://www.alibabacloud.com/help/en/model-studio/coding-plan).
@@ -298,7 +293,7 @@ from more than one provider before succeeding.
- For Amazon Bedrock, set `BEDROCK_BASE_URL` to the URL for the same region as
the API key and select one of the listed models.
- Vertex AI uses Google Application Default Credentials instead of an API key.
- Locally, run `gcloud auth application-default login` once; service-account
+ Locally, run `gcloud auth application-default login` once. Service-account
files and attached service accounts also work. Set `VERTEX_PROJECT_ID`, and
optionally change `VERTEX_LOCATION` from its `global` default.
- Cloudflare requires both its API token and account ID.
@@ -317,7 +312,7 @@ Start LM Studio's local server, load a tool-capable model, and use the model ide
### llama.cpp
-Start `llama-server` with its OpenAI-compatible Chat Completions API and enough context for the model. Use the local model ID with the `llamacpp/` prefix. `LLAMACPP_BASE_URL` defaults to `http://localhost:8080/v1`; FCC accepts either the server root or an explicit `/v1` suffix.
+Start `llama-server` with its OpenAI-compatible Chat Completions API and enough context for the model. Use the local model ID with the `llamacpp/` prefix. `LLAMACPP_BASE_URL` defaults to `http://localhost:8080/v1`.
### Ollama
@@ -326,16 +321,14 @@ ollama pull llama3.1
ollama serve
```
-Use the tag shown by `ollama list` with the `ollama/` prefix. `OLLAMA_BASE_URL` defaults to `http://localhost:11434`; FCC accepts either the root URL or an explicit `/v1` suffix.
+Use the tag shown by `ollama list` with the `ollama/` prefix. `OLLAMA_BASE_URL` defaults to `http://localhost:11434`.
</details>
<details>
<summary><strong>Optional model-tier routing</strong></summary>
-`MODEL` is the fallback for every request. Select a model for `MODEL_FABLE`, `MODEL_OPUS`, `MODEL_SONNET`, or `MODEL_HAIKU` to override an individual Claude Code tier; select **None** to use `MODEL`.
-
-For example, route Opus to `nvidia_nim/nvidia/nemotron-3-super-120b-a12b`, Sonnet to `open_router/openrouter/free`, Haiku to `lmstudio/qwen3.5-coder`, and keep `MODEL` on `zai/glm-5.2`.
+`MODEL` is the fallback for every request. Select a model for `MODEL_FABLE`, `MODEL_OPUS`, `MODEL_SONNET`, or `MODEL_HAIKU` to override an individual Claude Code tier. Select **None** to use `MODEL`.
</details>
@@ -346,7 +339,7 @@ Open **Admin UI → Model Config → Reasoning** and select the behavior you wan
| Selection | Behavior |
| --- | --- |
-| **From client** (default) | Use the effort sent by Claude Code, Codex, Pi, OpenCode, Cline, Hermes, DeepSeek Harness, Grok Build, Muse Code, or Aider. If none is sent, keep the provider default. |
+| **From client** (default) | Use the effort sent by your coding agent. If none is sent, keep the provider default. |
| **Off** | Request reasoning to be disabled. |
| **Low**, **Medium**, **High**, **X-High**, or **Max** | Override the client with the selected reasoning level. |
| **Inherit** (Fable, Opus, Sonnet, and Haiku only) | Use the root Reasoning selection. |
@@ -359,21 +352,16 @@ Providers that do not support a selected control retain their own behavior.
## Connect Your Client
-For terminal use, start `fcc-server`, then run `fcc-claude`, `fcc-codex`,
-`fcc-pi`, `fcc-opencode`, `fcc-cline`, `fcc-hermes`, `fcc-dsh`, `fcc-grok`,
-`fcc-muse`, or `fcc-aider`.
-
For editor and app integrations, install the client, start FCC, then open
**Admin UI → Integrations** and click **Connect** on its card.
-- **Claude Code in VS Code** — install the [Claude Code extension](https://marketplace.visualstudio.com/items?itemName=anthropic.claude-code).
-- **Claude Desktop** — install [Claude Desktop](https://claude.ai/download). Fully quit it before connecting or disconnecting, then reopen it. Disconnect returns to normal Claude sign-in.
-- **Codex in VS Code and App** — install the [Codex extension](https://marketplace.visualstudio.com/items?itemName=openai.chatgpt) or Codex App.
-- **Claude Code in JetBrains ACP** — install Claude Agent in JetBrains AI Assistant and start it once, then click **Connect** in FCC. Reopen the IDE, select **Claude Code (FCC)**, and start a new chat. After JetBrains updates the agent, restart FCC before starting a new chat. Requires a local IDE in its standard installation locations.
+- **Claude Code in VS Code**: Install the [Claude Code extension](https://marketplace.visualstudio.com/items?itemName=anthropic.claude-code).
+- **Claude Desktop**: Install [Claude Desktop](https://claude.ai/download). Fully quit it before connecting or disconnecting, then reopen it. Disconnect returns to normal Claude sign-in.
+- **Codex in VS Code and App**: Install the [Codex extension](https://marketplace.visualstudio.com/items?itemName=openai.chatgpt) or Codex App.
+- **Claude Code in JetBrains ACP**: Install Claude Agent in JetBrains AI Assistant and start it once, then click **Connect** in FCC. Reopen the IDE, select **Claude Code (FCC)**, and start a new chat. After JetBrains updates the agent, restart FCC before starting a new chat. Requires a local IDE in its standard installation locations.
Reload VS Code or restart the app/IDE after connecting. In Codex and Claude Desktop, select an FCC
-model from the model picker. FCC keeps connected integrations up to date when it
-starts; reload or restart the client when FCC reports updated settings. Use
+model from the model picker. Reload or restart the client when FCC reports updated settings. Use
**Disconnect** on the same card to remove the integration.
Run FCC on the same computer and in the same user environment as the client you
@@ -417,21 +405,17 @@ Configure integrations from **Admin UI → Messaging**, then click **Apply**.
| `/stats` | Show session state. |
| Standalone `/stop` | Cancel all work. |
| Reply with `/stop` | Cancel only the selected request while other queued requests continue. |
-| Standalone `/clear` | Reset all FCC state and remove every tracked message in that chat, including user prompts, voice notes, FCC replies, Telegram's online notice, and the clear command itself. |
-| Reply with `/clear` | Delete the selected message and its literal platform reply subtree while preserving its ancestors and siblings. |
+| Standalone `/clear` | Clear all FCC conversations and their messages in this chat. |
+| Reply with `/clear` | Delete the selected message and the chain of replies to it. Keep other conversations. |
<details>
<summary><strong>Voice notes</strong></summary>
-Re-run the installer with the command for your voice backend.
+NVIDIA NIM transcription support is included in every installation. In **Admin UI → Messaging → Voice**, enable voice notes, select `nvidia_nim`, and choose a supported model. Configure your **NVIDIA NIM API key** on the Providers page.
-macOS/Linux:
+For local Whisper on CPU or CUDA, re-run the installer with the local voice option:
-NVIDIA NIM transcription:
-
-```bash
-curl -fsSL "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install.sh" | sh -s -- --voice-nim
-```
+macOS/Linux:
Local Whisper on CPU or CUDA:
@@ -439,12 +423,6 @@ Local Whisper on CPU or CUDA:
curl -fsSL "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install.sh" | sh -s -- --voice-local
```
-Both backends:
-
-```bash
-curl -fsSL "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install.sh" | sh -s -- --voice-all
-```
-
Local Whisper with CUDA 13.0:
```bash
@@ -453,31 +431,19 @@ curl -fsSL "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main
Windows PowerShell:
-NVIDIA NIM transcription:
-
-```powershell
-& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install.ps1"))) -VoiceNim
-```
-
Local Whisper on CPU or CUDA:
```powershell
& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install.ps1"))) -VoiceLocal
```
-Both backends:
-
-```powershell
-& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install.ps1"))) -VoiceAll
-```
-
Local Whisper with CUDA 13.0:
```powershell
& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install.ps1"))) -VoiceLocal -TorchBackend cu130
```
-Restart `fcc-server`. In **Admin UI → Messaging → Voice**, enable voice notes, select `cpu`, `cuda`, or `nvidia_nim`, and choose the Whisper model. Local gated models need `HUGGINGFACE_API_KEY`; NVIDIA NIM transcription needs `NVIDIA_NIM_API_KEY`.
+After installing local support, restart `fcc-server`. In **Admin UI → Messaging → Voice**, enable voice notes, select `cpu` or `cuda`, and choose the Whisper model. Local gated models need `HUGGINGFACE_API_KEY`.
</details>
@@ -493,25 +459,25 @@ Stop all running FCC commands, then run:
fcc-update
```
-This runs the same installer as above, including its coding-agent prompts and checks. If you use voice support, pass the same voice options used during installation.
+For local voice support, include `--voice-local` (macOS/Linux) or `-VoiceLocal` (Windows), plus your `--torch-backend` or `-TorchBackend` option if used.
If your installation does not have `fcc-update` yet, run the [installer](#install) once to add it.
### Muse Code on native Windows
-Rerunning FCC's Windows installer with Muse Code selected installs or updates FCC's managed Muse executable. To install or update only Muse Code:
+To install or update only Muse Code:
```powershell
& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install-muse.ps1")))
```
-To remove only that managed Muse executable while preserving Muse data and other installations:
+To remove the Muse Code copy installed by FCC, keeping its data:
```powershell
& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/uninstall-muse.ps1")))
```
-FCC's ordinary uninstaller below continues to leave Muse Code installed.
+Uninstalling FCC leaves Muse Code installed.
### Uninstall
@@ -525,8 +491,7 @@ Stop every running FCC command before uninstalling.
**Keeps**
- uv and Python
-- Claude Code, Codex, Pi, OpenCode, Cline, Hermes, DeepSeek Harness, Grok Build, Muse Code, Aider, and RTK
-- Shared PATH entries
+- Your coding agents and RTK
macOS/Linux:
diff --git a/pyproject.toml b/pyproject.toml
index 84477521..d031b952 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "free-claude-code"
-version = "6.2.61"
+version = "6.2.62"
description = "Local proxy connecting coding agents to OpenAI-compatible AI providers"
readme = "README.md"
license = "AGPL-3.0-only"
@@ -34,6 +34,9 @@ dependencies = [
"Pillow>=12.0.0; sys_platform == 'win32' or sys_platform == 'darwin'",
"github-copilot-sdk==1.0.13",
"simplejson>=4.1.2",
+ "grpcio>=1.83.1",
+ "grpcio-tools>=1.81.1",
+ "nvidia-riva-client>=2.26.0",
]
[project.scripts]
@@ -53,11 +56,6 @@ fcc-aider = "free_claude_code.cli.launchers.aider:launch"
fcc-desktop = "free_claude_code.cli.desktop_entrypoint:launch"
[project.optional-dependencies]
-voice = [
- "grpcio>=1.83.1",
- "grpcio-tools>=1.81.1",
- "nvidia-riva-client>=2.26.0",
-]
voice_local = [
"torch>=2.14.0",
"transformers>=5.17.0",
@@ -153,12 +151,10 @@ python-version = "3.14"
[tool.ty.analysis]
# Optional voice_local extra: torch, transformers, librosa for local whisper transcription
-# Optional voice extra: nvidia-riva-client for nvidia_nim transcription provider
allowed-unresolved-imports = [
"torch",
"transformers",
"librosa",
- "riva.client",
"pystray",
"PIL",
]
diff --git a/scripts/install.ps1 b/scripts/install.ps1
index 1d536ed2..94eef9ae 100644
--- a/scripts/install.ps1
+++ b/scripts/install.ps1
@@ -1,7 +1,5 @@
param(
- [switch] $VoiceNim,
[switch] $VoiceLocal,
- [switch] $VoiceAll,
[string] $TorchBackend = "",
[switch] $Rtk,
[switch] $DryRun,
@@ -71,9 +69,7 @@ Usage: install.ps1 [options]
Installs or updates Free Claude Code and lets you choose which coding agents to install or verify.
Options:
- -VoiceNim Install NVIDIA NIM voice transcription support.
-VoiceLocal Install local Whisper voice transcription support.
- -VoiceAll Install all voice transcription backends.
-TorchBackend VALUE Use a uv PyTorch backend, such as cu130. Requires local voice.
-Rtk Install and configure RTK for the selected coding agents.
-DryRun Print commands without running them.
@@ -1398,21 +1394,7 @@ function Ensure-Uv {
}
function Get-PackageSpec {
- $includeNim = $VoiceNim
- $includeLocal = $VoiceLocal
-
- if ($VoiceAll) {
- $includeNim = $true
- $includeLocal = $true
- }
-
- if ($includeNim -and $includeLocal) {
- return "free-claude-code[voice,voice_local] @ $RepoArchiveUrl"
- }
- if ($includeNim) {
- return "free-claude-code[voice] @ $RepoArchiveUrl"
- }
- if ($includeLocal) {
+ if ($VoiceLocal) {
return "free-claude-code[voice_local] @ $RepoArchiveUrl"
}
return "free-claude-code @ $RepoArchiveUrl"
@@ -1605,8 +1587,8 @@ if ($RemainingArgs.Count -gt 0) {
throw "Unknown option: $($RemainingArgs -join ' ')"
}
-if ((-not [string]::IsNullOrWhiteSpace($TorchBackend)) -and (-not ($VoiceLocal -or $VoiceAll))) {
- throw "-TorchBackend requires -VoiceLocal or -VoiceAll."
+if ((-not [string]::IsNullOrWhiteSpace($TorchBackend)) -and (-not $VoiceLocal)) {
+ throw "-TorchBackend requires -VoiceLocal."
}
# Preserve the user's winning command before adding installer search paths.
diff --git a/scripts/install.sh b/scripts/install.sh
index 1feb5087..937b707d 100644
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -22,9 +22,7 @@ FCC_MACOS_OWNER_FILE=".free-claude-code-owner"
FCC_COMMANDS="fcc-desktop fcc-server fcc-claude fcc-codex fcc-pi fcc-opencode fcc-cline fcc-hermes fcc-dsh fcc-grok fcc-muse fcc-aider fcc-update fcc-init free-claude-code"
dry_run=0
-voice_nim=0
voice_local=0
-voice_all=0
install_claude=1
install_codex=1
install_pi=1
@@ -50,9 +48,7 @@ Usage: install.sh [options]
Installs or updates Free Claude Code and lets you choose which coding agents to install or verify.
Options:
- --voice-nim Install NVIDIA NIM voice transcription support.
--voice-local Install local Whisper voice transcription support.
- --voice-all Install all voice transcription backends.
--torch-backend VALUE Use a uv PyTorch backend, such as cu130. Requires local voice.
--rtk Install and configure RTK for the selected coding agents.
--dry-run Print commands without running them.
@@ -1261,15 +1257,9 @@ ensure_uv() {
parse_args() {
while [ "$#" -gt 0 ]; do
case "$1" in
- --voice-nim)
- voice_nim=1
- ;;
--voice-local)
voice_local=1
;;
- --voice-all)
- voice_all=1
- ;;
--torch-backend)
shift
[ "$#" -gt 0 ] || fail "--torch-backend requires a value."
@@ -1300,30 +1290,13 @@ parse_args() {
}
validate_args() {
- include_local=$voice_local
- if [ "$voice_all" -eq 1 ]; then
- include_local=1
- fi
-
- if [ -n "$torch_backend" ] && [ "$include_local" -ne 1 ]; then
- fail "--torch-backend requires --voice-local or --voice-all."
+ if [ -n "$torch_backend" ] && [ "$voice_local" -ne 1 ]; then
+ fail "--torch-backend requires --voice-local."
fi
}
package_spec() {
- include_nim=$voice_nim
- include_local=$voice_local
-
- if [ "$voice_all" -eq 1 ]; then
- include_nim=1
- include_local=1
- fi
-
- if [ "$include_nim" -eq 1 ] && [ "$include_local" -eq 1 ]; then
- printf 'free-claude-code[voice,voice_local] @ %s' "$REPO_ARCHIVE_URL"
- elif [ "$include_nim" -eq 1 ]; then
- printf 'free-claude-code[voice] @ %s' "$REPO_ARCHIVE_URL"
- elif [ "$include_local" -eq 1 ]; then
+ if [ "$voice_local" -eq 1 ]; then
printf 'free-claude-code[voice_local] @ %s' "$REPO_ARCHIVE_URL"
else
printf 'free-claude-code @ %s' "$REPO_ARCHIVE_URL"
diff --git a/src/free_claude_code/config/settings.py b/src/free_claude_code/config/settings.py
index 6e70fc4e..0434b02a 100644
--- a/src/free_claude_code/config/settings.py
+++ b/src/free_claude_code/config/settings.py
@@ -658,7 +658,7 @@ class Settings(BaseModel):
)
# Device: "cpu" | "cuda" | "nvidia_nim"
# - "cpu"/"cuda": local Whisper (requires voice_local extra: uv sync --extra voice_local)
- # - "nvidia_nim": NVIDIA NIM Whisper API (requires voice extra: uv sync --extra voice)
+ # - "nvidia_nim": NVIDIA NIM Whisper API (included in the standard installation)
whisper_device: NonEmptyString = Field(
default="cpu", validation_alias="WHISPER_DEVICE"
)
diff --git a/src/free_claude_code/providers/nvidia_nim/voice.py b/src/free_claude_code/providers/nvidia_nim/voice.py
index 89496f75..9f198ade 100644
--- a/src/free_claude_code/providers/nvidia_nim/voice.py
+++ b/src/free_claude_code/providers/nvidia_nim/voice.py
@@ -66,13 +66,7 @@ class NvidiaNimTranscriber:
f"Supported models: {', '.join(_NIM_ASR_MODEL_MAP)}"
)
function_id, language_code = model_config
- try:
- import riva.client
- except ImportError as exc:
- raise ImportError(
- "NVIDIA NIM transcription requires the voice extra. "
- "Install with: uv sync --extra voice"
- ) from exc
+ import riva.client
auth = riva.client.Auth(
use_ssl=True,
diff --git a/tests/contracts/test_import_boundaries.py b/tests/contracts/test_import_boundaries.py
index ac48c164..341a2c81 100644
--- a/tests/contracts/test_import_boundaries.py
+++ b/tests/contracts/test_import_boundaries.py
@@ -47,7 +47,7 @@ FACADE_ONLY_BOUNDARIES = {
"free_claude_code.providers.openai_chat",
}
-OPTIONAL_IMPORT_OWNERS = {
+DEFERRED_IMPORT_OWNERS = {
"librosa": "free_claude_code.messaging.transcription",
"torch": "free_claude_code.messaging.transcription",
"transformers": "free_claude_code.messaging.transcription",
@@ -657,24 +657,24 @@ def test_providers_do_not_own_wire_error_type_literals() -> None:
assert sorted(offenders) == []
-def test_optional_dependencies_have_one_lazy_owner() -> None:
+def test_transcription_dependencies_have_one_lazy_owner() -> None:
seen: set[str] = set()
offenders: list[str] = []
for record in _scan_imports(_PACKAGE_ROOT):
dependency = record.imported.split(".", 1)[0]
- owner = OPTIONAL_IMPORT_OWNERS.get(dependency)
+ owner = DEFERRED_IMPORT_OWNERS.get(dependency)
if owner is None:
continue
seen.add(dependency)
if record.importer != owner or not record.inside_function:
offenders.append(record.describe())
- assert seen == set(OPTIONAL_IMPORT_OWNERS)
+ assert seen == set(DEFERRED_IMPORT_OWNERS)
assert sorted(offenders) == []
-def test_runtime_imports_without_optional_voice_dependencies() -> None:
- blocked = sorted(OPTIONAL_IMPORT_OWNERS)
+def test_runtime_imports_without_loading_transcription_dependencies() -> None:
+ blocked = sorted(DEFERRED_IMPORT_OWNERS)
script = "\n".join(
(
"import importlib.abc",
diff --git a/tests/contracts/test_packaging_contracts.py b/tests/contracts/test_packaging_contracts.py
index 08526941..77eb99a1 100644
--- a/tests/contracts/test_packaging_contracts.py
+++ b/tests/contracts/test_packaging_contracts.py
@@ -1,4 +1,6 @@
import re
+import subprocess
+import sys
from pathlib import Path
@@ -15,3 +17,18 @@ def test_pyproject_first_party_packages_match_packaged_roots() -> None:
}
expected = {"free_claude_code", "smoke"}
assert configured == expected
+
+
+def test_standard_install_can_load_nim_transcription_client() -> None:
+ result = subprocess.run(
+ [
+ sys.executable,
+ "-c",
+ "from riva.client import Auth, ASRService, RecognitionConfig; "
+ "RecognitionConfig(language_code='en-US', max_alternatives=1)",
+ ],
+ capture_output=True,
+ text=True,
+ check=False,
+ )
+ assert result.returncode == 0, result.stderr
diff --git a/tests/scripts/test_installers.py b/tests/scripts/test_installers.py
index 66771e8e..55dec643 100644
--- a/tests/scripts/test_installers.py
+++ b/tests/scripts/test_installers.py
@@ -1758,18 +1758,44 @@ def test_install_sh_rejects_unparseable_existing_uv(
assert not any("astral.sh" in call for call in posix_harness.calls())
+ ("args", "package"),
+ [
+ ((), "free-claude-code @ "),
+ (("--voice-local",), "free-claude-code[voice_local] @ "),
+ (
+ ("--voice-local", "--torch-backend", "cu130"),
+ "free-claude-code[voice_local] @ ",
+ ),
+ ],
+)
def test_install_sh_voice_flags_only_change_fcc_spec(
posix_harness: PosixHarness,
+ args: tuple[str, ...],
+ package: str,
) -> None:
- result = posix_harness.run("--voice-all", "--torch-backend", "cu130")
+ result = posix_harness.run(*args)
assert result.returncode == 0, result.stderr
- assert any(
- "--torch-backend cu130 free-claude-code[voice,voice_local] @ "
- "https://github.com/Alishahryar1/free-claude-code/archive/refs/heads/main.zip"
- in call
+ install_calls = [
+ call
for call in posix_harness.calls()
- )
+ if "tool install" in call and "--refresh-package free-claude-code" in call
+ ]
+ assert len(install_calls) == 1
+ assert package in install_calls[0]
+ assert ("--torch-backend cu130" in install_calls[0]) == ("cu130" in args)
+
+
[email protected]("flag", ("--voice-nim", "--voice-all"))
+def test_install_sh_rejects_retired_voice_flags_before_mutation(
+ posix_harness: PosixHarness,
+ flag: str,
+) -> None:
+ result = posix_harness.run(flag)
+
+ assert result.returncode != 0
+ assert posix_harness.calls() == []
def test_install_sh_rejects_invalid_options_before_mutation(
@@ -3945,18 +3971,53 @@ def test_install_ps1_rejects_unparseable_existing_uv(
assert not any("astral.sh" in call for call in powershell_harness.calls())
+ ("args", "package"),
+ [
+ ((), "free-claude-code @ "),
+ (("-VoiceLocal",), "free-claude-code[voice_local] @ "),
+ (
+ ("-VoiceLocal", "-TorchBackend", "cu130"),
+ "free-claude-code[voice_local] @ ",
+ ),
+ ],
+)
def test_install_ps1_voice_flags_only_change_fcc_spec(
powershell_harness: PowerShellHarness,
+ args: tuple[str, ...],
+ package: str,
) -> None:
- result = powershell_harness.run("-VoiceAll", "-TorchBackend", "cu130")
+ result = powershell_harness.run(*args)
assert result.returncode == 0, result.stderr
- assert any(
- '--torch-backend cu130 "free-claude-code[voice,voice_local] @ '
- 'https://github.com/Alishahryar1/free-claude-code/archive/refs/heads/main.zip"'
- in call
+ install_calls = [
+ call
for call in powershell_harness.calls()
- )
+ if "tool install" in call and "--refresh-package free-claude-code" in call
+ ]
+ assert len(install_calls) == 1
+ assert package in install_calls[0]
+ assert ("--torch-backend cu130" in install_calls[0]) == ("cu130" in args)
+
+
[email protected]("flag", ("-VoiceNim", "-VoiceAll"))
+def test_install_ps1_rejects_retired_voice_flags_before_mutation(
+ powershell_harness: PowerShellHarness,
+ flag: str,
+) -> None:
+ result = powershell_harness.run(flag)
+
+ assert result.returncode != 0
+ assert powershell_harness.calls() == []
+
+
+def test_install_ps1_rejects_torch_backend_without_local_voice(
+ powershell_harness: PowerShellHarness,
+) -> None:
+ result = powershell_harness.run("-TorchBackend", "cu130")
+
+ assert result.returncode != 0
+ assert powershell_harness.calls() == []
@pytest.mark.parametrize("command_name", FCC_COMMANDS)
diff --git a/uv.lock b/uv.lock
index 4d80ea81..6ddc6f32 100644
--- a/uv.lock
+++ b/uv.lock
@@ -599,7 +599,7 @@ wheels = [
[[package]]
name = "free-claude-code"
-version = "6.2.61"
+version = "6.2.62"
source = { editable = "." }
dependencies = [
{ name = "aiohttp" },
@@ -608,12 +608,15 @@ dependencies = [
{ name = "fastapi", extra = ["standard"] },
{ name = "github-copilot-sdk" },
{ name = "google-auth", extra = ["requests"] },
+ { name = "grpcio" },
+ { name = "grpcio-tools" },
{ name = "httpx", extra = ["socks"] },
{ name = "httpx2", extra = ["socks"] },
{ name = "json5" },
{ name = "jsonschema" },
{ name = "loguru" },
{ name = "markdown-it-py" },
+ { name = "nvidia-riva-client" },
{ name = "openai" },
{ name = "pillow", marker = "sys_platform == 'darwin' or sys_platform == 'win32'" },
{ name = "pydantic" },
@@ -628,11 +631,6 @@ dependencies = [
]
[package.optional-dependencies]
-voice = [
- { name = "grpcio" },
- { name = "grpcio-tools" },
- { name = "nvidia-riva-client" },
-]
voice-local = [
{ name = "accelerate" },
{ name = "librosa" },
@@ -660,8 +658,8 @@ requires-dist = [
{ name = "fastapi", extras = ["standard"], specifier = ">=0.141.1" },
{ name = "github-copilot-sdk", specifier = "==1.0.13" },
{ name = "google-auth", extras = ["requests"], specifier = ">=2.56.3" },
- { name = "grpcio", marker = "extra == 'voice'", specifier = ">=1.83.1" },
- { name = "grpcio-tools", marker = "extra == 'voice'", specifier = ">=1.81.1" },
+ { name = "grpcio", specifier = ">=1.83.1" },
+ { name = "grpcio-tools", specifier = ">=1.81.1" },
{ name = "httpx", extras = ["socks"], specifier = ">=0.28.1" },
{ name = "httpx2", extras = ["socks"], specifier = ">=2.7.0,<3" },
{ name = "json5", specifier = ">=0.15.0" },
@@ -669,7 +667,7 @@ requires-dist = [
{ name = "librosa", marker = "extra == 'voice-local'", specifier = ">=1.0.0" },
{ name = "loguru", specifier = ">=0.7.0" },
{ name = "markdown-it-py", specifier = ">=4.2.0" },
- { name = "nvidia-riva-client", marker = "extra == 'voice'", specifier = ">=2.26.0" },
+ { name = "nvidia-riva-client", specifier = ">=2.26.0" },
{ name = "openai", specifier = ">=3.14.0" },
{ name = "pillow", marker = "sys_platform == 'darwin' or sys_platform == 'win32'", specifier = ">=12.0.0" },
{ name = "pydantic", specifier = ">=2.13.5" },
@@ -684,7 +682,7 @@ requires-dist = [
{ name = "transformers", marker = "extra == 'voice-local'", specifier = ">=5.17.0" },
{ name = "uvicorn", specifier = ">=0.52.1" },
]
-provides-extras = ["voice", "voice-local"]
+provides-extras = ["voice-local"]
[package.metadata.requires-dev]
dev = [