Skip to content

Add model variants to targets, run() and the CLI - #18

Open
audioshaker wants to merge 1 commit into
mainfrom
feat/target-variants
Open

audioshaker wants to merge 1 commit into
mainfrom
feat/target-variants

Conversation

@audioshaker

Copy link
Copy Markdown
Collaborator

Summary

The API now accepts a variant on each task target, for accounts it has enabled one for (currently the diarization previews preview_a–preview_d; see the #deployers thread). This adds it end to end.

  • Library: Target(variant=...) is sent as "variant" on the target. run() on both clients and build_targets() take variant=, applied to every model named by id, the same way residual is; the API does not say which models have variants, so the client passes it through rather than filtering by catalog. TargetResult.variant reads back what the API reports.
  • CLI: audioshake run --variant NAME. The run header shows it, and tasks get / tasks list show diarization (preview_a) when the API echoes it.
  • Docs and skill: docs/cli.md, docs/library.md, README example, the plugin skill (with a gotcha that comparing two variants is two runs on the same asset:ID), changelog under Unreleased, both plugin manifests bumped to 0.3.12.
audioshake run meeting.wav -m diarization --variant preview_a -f json

Two judgment calls:

  • --variant applies to every model in the run, so -m diarization,transcription --variant preview_a is rejected by the API as a whole. Per-model control is via Target in the library.
  • The duplicate-model check still rejects the same model twice even with different variants; not confirmed that the API accepts that in one task.

Test plan

  • uv run pytest (new tests for serialization, build_targets, the run() payload, CLI forwarding and the tasks get label)
  • uv run ruff check . && uv run ruff format --check .
  • uv run mypy
  • Against prod with an allowlisted account: audioshake run x.wav -m diarization --variant preview_a -f json, and confirm a non-allowlisted account gets the API's 400 before any task exists

🤖 Generated with Claude Code

The API now takes a `variant` on each task target, for accounts it has
enabled one for (the diarization previews, preview_a to preview_d). The
library sends it from Target(variant=...), run(variant=...) applies it to
every model named by id, and `audioshake run --variant NAME` does the same
from the command line. TargetResult.variant reads back what ran, and
`tasks get` shows it as `model (variant)`.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant