feat(doubleword): add Doubleword inference provider#2064
Open
jaedmunt wants to merge 1 commit into
Open
Conversation
OpenAI-compatible provider (`providers::doubleword`) covering the realtime tier: chat completions and streaming via the shared `openai::completion::GenericCompletionModel` (an `OpenAICompatibleProvider` impl on the extension), plus embeddings (`Qwen/Qwen3-Embedding-8B`). Configure with `DOUBLEWORD_API_KEY` (and optional `DOUBLEWORD_BASE_URL`).
Contributor
|
Hey there, we would love to support Doubleword, but seeing as you work for Doubleword, we kindly ask that you provide us with an API key so that we can test Rig against it more thoroughly. This would be mainly used for writing live cassette tests. Please contact me at: stephen@playgrounds.network |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New model provider: Doubleword
Description
Adds Doubleword as a first-class provider (
providers::doubleword) — OpenAI-compatible. Covers the realtime tier: chat completions + streaming via the sharedopenai::completion::GenericCompletionModel(anOpenAICompatibleProviderimpl on the extension), plus embeddings (Qwen/Qwen3-Embedding-8B). Configured viaDOUBLEWORD_API_KEYand optionalDOUBLEWORD_BASE_URL.API docs: https://docs.doubleword.ai/inference-api/intro-to-doubleword-inference · Models: https://docs.doubleword.ai/inference-api/models
Doubleword's async/batch tiers run through the OpenAI Batch API (submit→poll→fetch, no existing Rig abstraction) and are intentionally out of scope here — a separate, discussed contribution.
Fixes #2063
Testing
Verified locally against the live Doubleword API (ignored live tests under
tests/providers/doubleword/):cargo fmt --all -- --checkcargo clippy --all-features --all-targets— no new warningscargo test -p rig-core doubleword— unit + doc tests passcompletion_smoke,streaming_smoke,embeddings_smokepass (Qwen/Qwen3.5-9B,Qwen/Qwen3-Embedding-8B)Checklist:
Notes
Completions/streaming/telemetry are inherited from
GenericCompletionModelper the provider checklist (no hand-rolled completion model). Embeddings are a small hand-rolledEmbeddingModel(the generic embedding model injects adimensionsfield Doubleword's embedding model doesn't expect). Model constants reflect the liveGET /v1/modelscatalog.This PR was developed with AI assistance (Claude Code); I have reviewed all changes and am accountable for the code.