mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
Adds deepinfra, nebius, ollama-cloud, scaleway, siliconflow, siliconflow-cn, stepfun, and stepfun-cn from models.dev. Hosts without verified support for OpenAI-only request features leave out store, developer messages, long cache retention, and max_completion_tokens, and send reasoning_effort only where models.dev lists effort levels. SiliconFlow toggles thinking with enable_thinking; StepFun uses DeepSeek-style reasoning.
15 lines
595 B
TypeScript
15 lines
595 B
TypeScript
import { openAICompletionsApi } from "../api/openai-completions.lazy.ts";
|
|
import { envApiKeyAuth } from "../auth/helpers.ts";
|
|
import { createProvider, type Provider } from "../models.ts";
|
|
import { OLLAMA_CLOUD_MODELS } from "./ollama-cloud.models.ts";
|
|
|
|
export function ollamaCloudProvider(): Provider<"openai-completions"> {
|
|
return createProvider({
|
|
id: "ollama-cloud",
|
|
name: "Ollama Cloud",
|
|
baseUrl: "https://ollama.com/v1",
|
|
auth: { apiKey: envApiKeyAuth("Ollama Cloud API key", ["OLLAMA_API_KEY"]) },
|
|
models: Object.values(OLLAMA_CLOUD_MODELS),
|
|
api: openAICompletionsApi(),
|
|
});
|
|
}
|