Skip to content

feat(doubleword): add Doubleword inference provider#2064

Open
jaedmunt wants to merge 1 commit into
0xPlaygrounds:mainfrom
jaedmunt:doubleword-provider
Open

feat(doubleword): add Doubleword inference provider#2064
jaedmunt wants to merge 1 commit into
0xPlaygrounds:mainfrom
jaedmunt:doubleword-provider

Conversation

@jaedmunt

@jaedmunt jaedmunt commented Jul 9, 2026

Copy link
Copy Markdown

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 shared openai::completion::GenericCompletionModel (an OpenAICompatibleProvider impl on the extension), plus embeddings (Qwen/Qwen3-Embedding-8B). Configured via DOUBLEWORD_API_KEY and optional DOUBLEWORD_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 -- --check
  • cargo clippy --all-features --all-targets — no new warnings
  • cargo test -p rig-core doubleword — unit + doc tests pass
  • Live completion_smoke, streaming_smoke, embeddings_smoke pass (Qwen/Qwen3.5-9B, Qwen/Qwen3-Embedding-8B)

Checklist:

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I've reviewed the provider API documentation and implemented the types of response accurately

Notes

Completions/streaming/telemetry are inherited from GenericCompletionModel per the provider checklist (no hand-rolled completion model). Embeddings are a small hand-rolled EmbeddingModel (the generic embedding model injects a dimensions field Doubleword's embedding model doesn't expect). Model constants reflect the live GET /v1/models catalog.

This PR was developed with AI assistance (Claude Code); I have reviewed all changes and am accountable for the code.

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`).
@jaedmunt jaedmunt marked this pull request as ready for review July 9, 2026 14:26
@gold-silver-copper

Copy link
Copy Markdown
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

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.

feat: Add support for Doubleword

2 participants