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.
16 lines
635 B
TypeScript
16 lines
635 B
TypeScript
import { defineProvider, modelsDevModels } from "../define.ts";
|
|
import { catalogedEffortCompat, OPENAI_COMPATIBLE_HOST_COMPAT } from "../openai-compatible.ts";
|
|
|
|
// Scaleway Generative APIs take `max_completion_tokens` and native `reasoning_effort`.
|
|
export default defineProvider({
|
|
id: "scaleway",
|
|
models: (ctx) =>
|
|
modelsDevModels(ctx, "scaleway", {
|
|
api: "openai-completions",
|
|
baseUrl: "https://api.scaleway.ai/v1",
|
|
map: (model, source) => ({ ...model, compat: catalogedEffortCompat(source) }),
|
|
}),
|
|
compat: {
|
|
"openai-completions": { ...OPENAI_COMPATIBLE_HOST_COMPAT, maxTokensField: "max_completion_tokens" },
|
|
},
|
|
});
|