Skip to content

feat: add doubleword provider - #774

Open
jaedmunt wants to merge 1 commit into
charmbracelet:mainfrom
jaedmunt:feat/doubleword-provider
Open

jaedmunt wants to merge 1 commit into
charmbracelet:mainfrom
jaedmunt:feat/doubleword-provider

Conversation

@jaedmunt

Copy link
Copy Markdown

Adds Doubleword as provider doubleword. Doubleword serves open models through an OpenAI-compatible API, so Crush users can pick these models with DOUBLEWORD_API_KEY. I work at Doubleword.

  • Type: completions at https://api.doubleword.ai/v1.
  • Models: GLM 5.3, GLM 5.3 Flash, Kimi K3.1 Pro, DeepSeek V4 Pro 0813, DeepSeek V4.1 Flash and Qwen3.8 27B. These are the chat and coding models in our public catalog that handle tool calls well. Embedding and OCR models are left out.
  • Default models: GLM 5.3 (large) and GLM 5.3 Flash (small).
  • Prices: USD per 1M tokens at the realtime tier, from GET /v1/models?include=pricing and the models page. cache_hit is the cache read price. Caching is implicit and never bills writes for requests without cache_control markers, so cache_create is left out.
  • Context windows: taken from the limits the API returns when a request is too long (1,048,576 for most models, 1,048,572 for GLM 5.3 Flash, 262,140 for Qwen3.8 27B). DeepSeek V4 Pro 0813 did not return a number, so it uses the model's published 1,048,576.
  • Max tokens: the API does not publish an output cap, so I set 131,072 for the 1M models and 65,536 for Qwen.
  • Reasoning: every model accepts reasoning_effort and turns thinking off with none, so all are toggleable. DeepSeek maps its efforts to low, high and max, so those are the levels listed. Qwen only switches thinking on or off, so it has no levels. Reasoning comes back in reasoning_content.
  • Vision: GLM 5.3 Flash, Kimi K3.1 Pro, DeepSeek V4.1 Flash and Qwen3.8 27B accept images.

Testing:

  • go test ./... passes, and go run ./cmd/format and gofumpt leave no diff.

  • For each model I made a chat completions call with a read_file tool, sent back the tool result and got a final answer. I also made streamed calls with reasoning_effort set to none and high. Every model returned the tool call with finish_reason: tool_calls.

  • I have read CONTRIBUTING.md.

  • [-] I have created a discussion that was approved by a maintainer (for new features). This adds a provider config only.

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