feat: add SaladCloud AI chat provider - #3535
mgorkii-nlplogix wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds SaladCloud AI Gateway as a new provider for the backend puter-chat-completion driver, exposing the qwen3.6-35b-a3b model via an OpenAI-compatible Chat Completions endpoint and integrating it into provider registration, pricing, and tests.
Changes:
- Introduces
SaladCloudProviderbuilt on the existing OpenAI SDK path with metering support. - Adds a SaladCloud model catalog (
saladcloud:qwen3.6-35b-a3bplus alias) with pricing/capabilities metadata. - Registers the provider in
ChatCompletionDriver, updates edge tests to include it, and extendsconfig.template.jsoncwith provider configuration.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/backend/drivers/ai-chat/providers/saladcloud/SaladCloudProvider.ts | New SaladCloud provider implementation using OpenAI-compatible chat completions + metering hooks. |
| src/backend/drivers/ai-chat/providers/saladcloud/SaladCloudProvider.test.ts | Unit tests for provider construction, model catalog, option forwarding, streaming usage inclusion, and metering. |
| src/backend/drivers/ai-chat/providers/saladcloud/SaladCloudProvider.integration.test.ts | Optional gated integration test against the real SaladCloud endpoint. |
| src/backend/drivers/ai-chat/providers/saladcloud/models.ts | Defines the SaladCloud model entry, aliases, pricing, and helper for stripping provider prefixes. |
| src/backend/drivers/ai-chat/ChatCompletionDriver.ts | Registers saladcloud provider when configured with an API key. |
| src/backend/drivers/ai-chat/ChatCompletionDriver.edges.test.ts | Extends provider-registration edge coverage to include SaladCloud. |
| config.template.jsonc | Adds providers.saladcloud template config with apiKey and apiBaseUrl. |
Suppressed comments (1)
src/backend/drivers/ai-chat/providers/saladcloud/SaladCloudProvider.ts:99
reasoning_effort/verbosityare currently not forwarded into the OpenAI Chat Completions request parameters, so the upstream never receives these controls even when provided by callers.
...(max_tokens !== undefined ? { max_tokens } : {}),
...(temperature !== undefined ? { temperature } : {}),
...(top_p !== undefined ? { top_p } : {}),
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
hi @mgorkii-nlplogix I'm not quite sure we'll be able to merge this. Seems like SaladCloud ai gateway is currently behind a waitlist. I've requested access, but not sure what that timeline looks like. So if we can't verify this works ourselves then we might just close it. Appreciate the contribution and just wanted to be transparent in case this closes abruptly |
806d41b to
56d4ae2
Compare
|
Just need to resolve some merge conflicts and add missing models, and we should be good to go in just about a few minutes. |
Resolves the Hoonify collisions (config template, driver registration,
edges test) by keeping both providers. Takes main's `text` typing in
types.ts over the branch's `string & { verbosity }` intersection, and
drops the branch's typecheck-baseline edits so the file matches main.
Registers SALADCLOUD_MODELS in the CATALOGS list that main added, which
the branch predates.
The catalog carried only qwen3.6-35b-a3b. SaladCloud documents three models on the gateway, all at 262,144 context and max output with text and image input, tool calling, structured output, and reasoning, so add qwen3.6-27b and qwen3.5-9b at their published rates. qwen3.5-9b gets no release_date: SaladCloud publishes none and no other catalog here carries the model, so the field is left off rather than guessed. The gateway also serves qwen3.5-35b-a3b, which stays out until a rate is published for it — metering has nothing to charge against.
|
SaladCloud doesn't work at all currently, so this PR is not viable. Sorry. |
What
Adds SaladCloud AI Gateway as a provider for the
puter-chat-completiondriver. The integration exposes the currently supportedqwen3.6-35b-a3bmodel through SaladCloud's OpenAI-compatible API.How it works
SaladCloudProvider, backed by the existing OpenAI SDK path and the defaulthttps://ai.salad.cloud/v1endpoint.providers.saladcloud.apiKeyis configured; an optionalapiBaseUrlsupports compatible test or proxy endpoints.saladcloud:qwen3.6-35b-a3b(plussaladcloud/qwen3.6-35b-a3b) with the published model capabilities, 262,144-token context/output limits, and current $0.09/$0.60 per-million input/output pricing.userfield for provider-side abuse tracing without sending the OpenAI-specificsafety_identifierfield.Testing
npx vitest run --config src/backend/vitest.config.ts SaladCloudProvider.test.ts SaladCloudProvider.integration.test.ts ChatCompletionDriver.edges.test.ts— 28 passed, 1 skipped.npm run build:ts— passed.PUTER_TEST_AI_SALADCLOUD_API_KEY; it was skipped because that credential is not available in this environment.Security