Skip to content

feat: add DotHoosh as a provider - #13404

Open
Alirezajalilii wants to merge 1 commit into
continuedev:mainfrom
Alirezajalilii:feat/provider-dothoosh
Open

Alirezajalilii wants to merge 1 commit into
continuedev:mainfrom
Alirezajalilii:feat/provider-dothoosh

Conversation

@Alirezajalilii

@Alirezajalilii Alirezajalilii commented Oct 20, 2026 •

Copy link
Copy Markdown

Description

Adds DotHoosh as an OpenAI-compatible provider (provider: dothoosh, default apiBase https://gateway.dothoosh.com/v1/), wired the same way as nebius: core class, LLM registry, config-types, openai-adapters, the Add Model GUI entry, the VS Code config schema, logo, and a docs page. There is no linked issue; this is a new provider request. The CLA is signed (comment on this PR).

DotHoosh is an OpenAI-compatible and Anthropic-compatible AI gateway for developers in Iran, billed in Toman from a prepaid wallet. It is a recently launched service and I am not claiming usage numbers. API docs: https://gateway.dothoosh.com/docs.

Models are not hard-coded. Like OpenRouter, the Add Model picker reads the catalog live: core/llm/fetchModels.ts fetches https://www.dothoosh.com/gateway/v1/models and https://www.dothoosh.com/gateway/anthropic/v1/models (public, no key needed, so the list fills before a key exists; each request times out after 10 seconds). The Iran-hosted API (gateway.dothoosh.com) is not reachable from outside Iran, so the public catalog is mirrored at that URL and relays the same data. It maps context_length, top_provider.max_completion_tokens and supported_parameters (tools, only when it is a list). A new DotHoosh model, or a changed limit, reaches Continue without a release. If a listing fails, the other one is still used; if both fail the list is empty, as for OpenRouter, and the picker keeps the list it already has (the Add Model form then lets you type a model ID). One damaged entry in the response (null, a non-string id, a non-positive limit) is skipped instead of emptying the list.

Claude is served only on DotHoosh's Anthropic-compatible endpoint, so models listed only there are offered in the picker as packages that the Add Model form saves with provider: anthropic and apiBase: https://gateway.dothoosh.com/anthropic/v1/ (Continue's Anthropic client sends x-api-key, which that endpoint requires). Models on both listings, such as DeepSeek, stay on the dothoosh provider (Chat Completions). The docs page shows the same setup for config.yaml.

Known limitation, also in the docs: GPT-6 accepts function tools only on the Responses API, which Continue uses for the openai provider only. DotHoosh is not added to PROVIDER_SUPPORTS_IMAGES, because its routes are text-only today.

Not tested: a real request with a DotHoosh key. No key was available and the Iran-hosted API is unreachable from outside Iran, so chat and the Anthropic-route setup are exercised against mocked responses only.

AI Code Review

  • Team members only: AI review runs automatically when PR is opened or marked ready for review
  • Team members can also trigger a review by commenting @continue-review

This PR was written with AI assistance (Claude Code, model claude-sonnet-5-5). The author has not yet line-reviewed the final diff.

Checklist

  • I've read the contributing guide
  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

Screen recording or screenshot

N/A for a recording: the only visible change is a new DotHoosh entry in the Add Model form, filled from the live catalog; when the catalog cannot be loaded the form shows a field for typing the model ID. I did not run the extension GUI against a live DotHoosh API, so I have no real capture to attach.

Tests

Run on the final commit with Node 24:

  • core: npx tsc -p ./ --noEmit and gui: npx tsc -p ./ --noEmit exit 0; prettier check on the changed files clean.
  • core/llm/llms/OpenAI-compatible.vitest.ts: 7 new dothoosh cases (provider name, default apiBase, chat and completion requests, embeddings).
  • core/llm/fetchModels.vitest.ts: 24 cases for the live catalog (both mirror URLs, context, max-output and tools mapping, Claude on the Anthropic route, models on both routes, one listing failing without dropping the other, entries without an id, non-list supported_parameters, non-string names, timeout, HTTP error, network failure, malformed body, damaged entries and limits). npx vitest run llm/fetchModels.vitest.ts llm/llms/OpenAI-compatible.vitest.ts in core: 2 files, 242 tests passed.
  • gui/src/pages/AddNewModel/configs/fetchProviderModels.test.ts (7): the picker keeps its list when a refresh returns nothing, and Claude packages carry provider: anthropic and the Anthropic apiBase. gui/src/forms/buildAddedModel.test.ts (5): the saved model entry, including a typed model ID when the catalog is empty. Both files: 12 tests passed.

🤖 Generated with Claude Code

@Alirezajalilii
Alirezajalilii requested a review from a team as a code owner October 20, 2026 07:43
@Alirezajalilii
Alirezajalilii requested review from sestinj and removed request for a team October 20, 2026 07:43
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@Alirezajalilii

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@Alirezajalilii

Copy link
Copy Markdown
Author

DotHoosh now serves the full vendor context windows and bills long prompts at the vendor's long-context tier. This updates the values to match https://gateway.dothoosh.com/models. Commit 734c534.

Add DotHoosh, an OpenAI- and Anthropic-compatible AI gateway, as a provider, wired like nebius:
core class and registry, config types, openai-adapters, the Add Model entry, the VS Code config
schema, logo and a docs page.

The Add Model picker reads DotHoosh's public model catalog live (both the OpenAI and the Anthropic
listing) instead of a hard-coded list, so new models and changed limits need no release. Models
served only on the Anthropic route are offered as `anthropic` models with the DotHoosh Anthropic
`apiBase`. A failing listing never empties the other one, and an empty catalog still lets the user
type a model ID.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Alirezajalilii Alirezajalilii changed the title feat: add DotHoosh (دات‌هوش) provider feat: add DotHoosh as a provider Oct 24, 2026
@Alirezajalilii

Copy link
Copy Markdown
Author

The branch is now one commit on top of current main. It reads the DotHoosh model list live from the public catalog (OpenAI and Anthropic listings), with no hard-coded models, limits or prices. The earlier comment's commit hash refers to the previous history.

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