Skip to content

feat(realtime): add speed=fast option and supportedSpeeds model capability - #13

Merged
AdirAmsalem merged 3 commits into
mainfrom
conductor/fast-mode-speed-fast-realtime-option-decart-cpp
Sep 24, 2026
Merged

AdirAmsalem merged 3 commits into
mainfrom
conductor/fast-mode-speed-fast-realtime-option-decart-cpp

Conversation

@AdirAmsalem

@AdirAmsalem AdirAmsalem commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds an optional realtime fast mode to the C++ SDK, matching the speed option in the other Decart SDKs.

Fast mode (speed=fast) serves the session from a higher-compute tier for lower latency and higher throughput; output quality is unchanged. It is currently available for lucy-2.5 / lucy-latest and lucy-vton-3.5 / lucy-vton-latest, in the US region only, and is billed at 2x the standard realtime rate for those models. Other models ignore the option (the SDK logs a warning). Omit it (the default) for standard mode.

Callers can discover which models advertise fast mode through ModelDefinition::supportedSpeeds. The README now documents speed alongside the previously undocumented resolution option, and examples/realtime_warmup opts in when DECART_SPEED=fast is set.

Usage

decart::ConnectOptions options;
options.model = decart::models::realtime("lucy-2.5");
options.speed = decart::Speed::Fast; // lower latency, 2x rate, US region only
auto session = client.realtime().connect(source, options);

Verification

./scripts/format.sh --check                                   -> clang-format done (--dry-run --Werror)
cmake -B build/norealtime -S . -DDECART_BUILD_REALTIME=OFF
cmake --build build/norealtime                                -> Built target decart_tests, 0 warnings
ctest (build/norealtime)                                      -> 100% tests passed (19 test cases, 89 assertions)
cmake --preset release -DDECART_LIVEKIT_VERSION=1.11.0
cmake --build --preset release --target decart                -> libdecart.a built, 0 warnings
ninja -C build/release -k 0                                   -> all sources and tests compile

The realtime preset could not be linked on the authoring machine; CI on a supported distro runs ctest for it. CI pins LiveKit 1.11.0 because upstream's latest release is asset-less; unpin when fixed upstream.

Live test (production signaling, 2026-09-23 ~15:05Z)

Ran the SDK's own URL builder and SignalingChannel::openAndJoin against wss://api3.decart.ai/v1/stream with a test key supplied via DECART_API_KEY. Each run sent livekit_join, received livekit_room_info, and closed within about one second.

Scenario URL query (key redacted) Result
lucy-2.5, no speed option model=lucy-2.5 accepted
lucy-2.5, Speed::Fast model=lucy-2.5&speed=fast accepted
lucy-vton-3.5, Speed::Fast model=lucy-vton-3.5&speed=fast accepted
lucy-2.1, Speed::Fast model=lucy-2.1&speed=fast SDK logged the unsupported-model warning; server accepted

Compatibility

Positional aggregate-initializer compatible: with speed unset the signaling URL is unchanged (pinned by test); no model ids, aliases, defaults, or version change. The new fields are appended last, so existing positional aggregate initializers of ConnectOptions and ModelDefinition remain compatible (pinned by test), while structured bindings (element count 11->12 and 5->6) and binary layouts change, so consumers must rebuild against this version.


Open workspace in Conductor

…ility

Add `decart::Speed { Fast }` with `toString(Speed)` -> "fast", an optional
`ConnectOptions::speed` that appends `speed=fast` to the signaling URL (omitted
when unset, so the default URL is byte-identical), and
`ModelDefinition::supportedSpeeds` advertising fast mode on lucy-2.5,
lucy-latest, lucy-vton-3.5 and lucy-vton-latest only. Requesting a speed on a
model without it logs a warning and still sends the parameter.

Extract the signaling URL construction into the pure detail helper
`buildStreamUrl` so it is unit-testable without LiveKit, and document
`resolution`/`speed` in the README and the warmup example.
Keep the pre-existing positional aggregate initializer shape of ConnectOptions
compiling unchanged by placing the new optional speed field last, and pin that
shape with a compile-check test.
@AdirAmsalem
AdirAmsalem marked this pull request as ready for review September 24, 2026 05:55
@AdirAmsalem
AdirAmsalem merged commit 39092f1 into main Sep 24, 2026
4 checks passed
@AdirAmsalem
AdirAmsalem deleted the conductor/fast-mode-speed-fast-realtime-option-decart-cpp branch September 24, 2026 05: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.

1 participant