Skip to content

feat: add SaladCloud AI chat provider - #3535

Open
mgorkii-nlplogix wants to merge 2 commits into
HeyPuter:mainfrom
mgorkii-nlplogix:agent/add-saladcloud-provider
Open

feat: add SaladCloud AI chat provider#3535
mgorkii-nlplogix wants to merge 2 commits into
HeyPuter:mainfrom
mgorkii-nlplogix:agent/add-saladcloud-provider

Conversation

@mgorkii-nlplogix

@mgorkii-nlplogix mgorkii-nlplogix commented Aug 10, 2026

Copy link
Copy Markdown

What

Adds SaladCloud AI Gateway as a provider for the puter-chat-completion driver. The integration exposes the currently supported qwen3.6-35b-a3b model through SaladCloud's OpenAI-compatible API.

How it works

  • Adds SaladCloudProvider, backed by the existing OpenAI SDK path and the default https://ai.salad.cloud/v1 endpoint.
  • Registers the provider only when providers.saladcloud.apiKey is configured; an optional apiBaseUrl supports compatible test or proxy endpoints.
  • Exposes saladcloud:qwen3.6-35b-a3b (plus saladcloud/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.
  • Resolves Puter file references into inline media before sending multimodal requests upstream.
  • Supports streaming, image input, tool calls, structured output, reasoning controls, and usage-based metering through the existing chat-completion driver contracts.
  • Passes the standard OpenAI-compatible user field for provider-side abuse tracing without sending the OpenAI-specific safety_identifier field.

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.
  • The real integration test is intentionally gated on PUTER_TEST_AI_SALADCLOUD_API_KEY; it was skipped because that credential is not available in this environment.

Security

  • The API key is passed only to the configured SaladCloud-compatible endpoint and is not logged.
  • The provider is inactive unless explicitly configured.
  • No new inbound HTTP surface is introduced.

@CLAassistant

CLAassistant commented Aug 10, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@mgorkii-nlplogix
mgorkii-nlplogix marked this pull request as ready for review August 10, 2026 19:46
@Salazareo
Salazareo requested review from ProgrammerIn-wonderland and a lite review from Copilot August 10, 2026 22:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 SaladCloudProvider built on the existing OpenAI SDK path with metering support.
  • Adds a SaladCloud model catalog (saladcloud:qwen3.6-35b-a3b plus alias) with pricing/capabilities metadata.
  • Registers the provider in ChatCompletionDriver, updates edge tests to include it, and extends config.template.jsonc with 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/verbosity are 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.

@Salazareo

Copy link
Copy Markdown
Member

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

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.

4 participants