feat: add SaladCloud AI chat provider - #3535
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 |
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