Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/llm/autodetect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ const PROVIDER_HANDLES_TEMPLATING: string[] = [
"minimax",
"groq",
"gemini",
"saygm",
"docker",
"nous",
"zAI",
Expand Down
39 changes: 39 additions & 0 deletions core/llm/llms/Saygm.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { ChatCompletionCreateParams } from "openai/resources/index";

import { LLMOptions } from "../../index.js";
import { osModelsEditPrompt } from "../templates/edit.js";

import OpenAI from "./OpenAI.js";

class Saygm extends OpenAI {
static providerName = "saygm";

static defaultOptions: Partial<LLMOptions> = {
apiBase: "https://api.saygm.com/v1/",
model: "gpt-5.4",
promptTemplates: {
edit: osModelsEditPrompt,
},
useLegacyCompletionsEndpoint: false,
};

protected modifyChatBody(
body: ChatCompletionCreateParams,
): ChatCompletionCreateParams {
const modified = super.modifyChatBody(body);
if (
modified.model === "gpt-5.6-sol" &&
Array.isArray(modified.tools) &&
modified.tools.length > 0
) {
(
modified as Omit<ChatCompletionCreateParams, "reasoning_effort"> & {
reasoning_effort?: string;
}
).reasoning_effort = "none";
}
return modified;
}
}

export default Saygm;
2 changes: 2 additions & 0 deletions core/llm/llms/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import Fireworks from "./Fireworks";
import Flowise from "./Flowise";
import FunctionNetwork from "./FunctionNetwork";
import Gemini from "./Gemini";
import Saygm from "./Saygm";
import Groq from "./Groq";
import HuggingFaceInferenceAPI from "./HuggingFaceInferenceAPI";
import HuggingFaceTEIEmbeddingsProvider from "./HuggingFaceTEI";
Expand Down Expand Up @@ -76,6 +77,7 @@ export const LLMClasses = [
CometAPI,
FunctionNetwork,
Gemini,
Saygm,
Llamafile,
Moonshot,
Ollama,
Expand Down
106 changes: 106 additions & 0 deletions docs/customize/model-providers/more/saygm.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
---
title: "SayGM"
description: "Configure SayGM's frontier models (GPT-5.x, o-series) with Continue. SayGM is a decentralized inference subnet on Bittensor serving OpenAI-compatible models."
---

[SayGM](https://saygm.com) is a decentralized inference subnet on Bittensor that serves frontier OpenAI models (GPT-5.x, o-series) over an OpenAI-compatible API at `https://api.saygm.com/v1`.

## Configuration

To use SayGM models, you need to:

1. Sign up at [saygm.com](https://saygm.com) and get an API key (a `gm_live_...` token)
2. Add the following configuration:

<Tabs>
<Tab title="YAML">
```yaml title="config.yaml"
name: My Config
version: 0.0.1
schema: v1

models:
- name: GPT-5.6 Sol
provider: saygm
model: gpt-5.6-sol
apiKey: <YOUR_SAYGM_API_KEY>
```
</Tab>
<Tab title="JSON (Deprecated)">
```json title="config.json"
{
"models": [
{
"title": "GPT-5.6 Sol",
"provider": "saygm",
"model": "gpt-5.6-sol",
"apiKey": "<YOUR_SAYGM_API_KEY>"
}
]
}
```
</Tab>
</Tabs>

## Available Models

SayGM currently serves the following OpenAI-chat-compatible models (all with a 1M token context window):

- `gpt-5.6-sol`: latest frontier reasoning model
- `gpt-5.6-terra`: mid-tier frontier model
- `gpt-5.6-luna`: fast frontier model
- `gpt-5.5`: frontier reasoning model
- `gpt-5.4`: flagship reasoning model
- `gpt-5.4-mini`: compact frontier model
- `gpt-5.4-nano`: smallest gpt-5.4 model
- `o3`: full o3 reasoning model
- `o4-mini`: compact o-series reasoning model

SayGM also serves Claude models and `gpt-5.5-pro`, but those require the Anthropic / OpenAI Responses wire protocols respectively, which Continue does not expose for the `saygm` provider.

## Configuration Options

| Option | Description | Default |
| --------- | ----------------- | ----------------------------- |
| `apiKey` | SayGM API key | Required |
| `apiBase` | API base URL | `https://api.saygm.com/v1/` |
| `model` | Model name to use | `gpt-5.4` |

## Example

Here's a complete configuration example:

<Tabs>
<Tab title="YAML">
```yaml title="config.yaml"
name: My Config
version: 0.0.1
schema: v1

models:
- name: GPT-5.6 Sol
provider: saygm
model: gpt-5.6-sol
apiKey: <YOUR_SAYGM_API_KEY>
defaultCompletionOptions:
maxTokens: 128000
```
</Tab>
<Tab title="JSON (Deprecated)">
```json title="config.json"
{
"models": [
{
"title": "GPT-5.6 Sol",
"provider": "saygm",
"model": "gpt-5.6-sol",
"apiKey": "<YOUR_SAYGM_API_KEY>",
"completionOptions": {
"maxTokens": 128000
}
}
]
}
```
</Tab>
</Tabs>
7 changes: 7 additions & 0 deletions gui/public/logos/saygm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
126 changes: 126 additions & 0 deletions gui/src/pages/AddNewModel/configs/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2306,6 +2306,132 @@ export const models: { [key: string]: ModelPackage } = {
icon: "openai.png",
isOpenSource: false,
},
saygmGpt5_4: {
title: "GPT-5.4",
description:
"Frontier reasoning model served on the SayGM inference subnet (Bittensor), 1M context.",
params: {
model: "gpt-5.4",
contextLength: 1_000_000,
completionOptions: { maxTokens: 128_000 },
title: "GPT-5.4",
},
providerOptions: ["saygm"],
icon: "saygm.svg",
isOpenSource: false,
},
saygmGpt5_4Mini: {
title: "GPT-5.4 Mini",
description:
"Fast frontier model served on the SayGM inference subnet (Bittensor), 1M context.",
params: {
model: "gpt-5.4-mini",
contextLength: 1_000_000,
completionOptions: { maxTokens: 128_000 },
title: "GPT-5.4 Mini",
},
providerOptions: ["saygm"],
icon: "saygm.svg",
isOpenSource: false,
},
saygmGpt5_4Nano: {
title: "GPT-5.4 Nano",
description:
"Smallest gpt-5.4 model served on the SayGM inference subnet (Bittensor), 1M context.",
params: {
model: "gpt-5.4-nano",
contextLength: 1_000_000,
completionOptions: { maxTokens: 128_000 },
title: "GPT-5.4 Nano",
},
providerOptions: ["saygm"],
icon: "saygm.svg",
isOpenSource: false,
},
saygmGpt5_5: {
title: "GPT-5.5",
description:
"Frontier reasoning model served on the SayGM inference subnet (Bittensor), 1M context.",
params: {
model: "gpt-5.5",
contextLength: 1_000_000,
completionOptions: { maxTokens: 128_000 },
title: "GPT-5.5",
},
providerOptions: ["saygm"],
icon: "saygm.svg",
isOpenSource: false,
},
saygmGpt5_6Sol: {
title: "GPT-5.6 Sol",
description:
"Latest frontier reasoning model served on the SayGM inference subnet (Bittensor), 1M context.",
params: {
model: "gpt-5.6-sol",
contextLength: 1_000_000,
completionOptions: { maxTokens: 128_000 },
title: "GPT-5.6 Sol",
},
providerOptions: ["saygm"],
icon: "saygm.svg",
isOpenSource: false,
},
saygmGpt5_6Luna: {
title: "GPT-5.6 Luna",
description:
"Compact frontier model served on the SayGM inference subnet (Bittensor), 1M context.",
params: {
model: "gpt-5.6-luna",
contextLength: 1_000_000,
completionOptions: { maxTokens: 128_000 },
title: "GPT-5.6 Luna",
},
providerOptions: ["saygm"],
icon: "saygm.svg",
isOpenSource: false,
},
saygmGpt5_6Terra: {
title: "GPT-5.6 Terra",
description:
"Mid-tier frontier model served on the SayGM inference subnet (Bittensor), 1M context.",
params: {
model: "gpt-5.6-terra",
contextLength: 1_000_000,
completionOptions: { maxTokens: 128_000 },
title: "GPT-5.6 Terra",
},
providerOptions: ["saygm"],
icon: "saygm.svg",
isOpenSource: false,
},
saygmO3: {
title: "o3",
description:
"Full o3 reasoning model served on the SayGM inference subnet (Bittensor), 1M context.",
params: {
model: "o3",
contextLength: 1_000_000,
completionOptions: { maxTokens: 100_000 },
title: "o3",
},
providerOptions: ["saygm"],
icon: "saygm.svg",
isOpenSource: false,
},
saygmO4Mini: {
title: "o4 Mini",
description:
"Compact o-series reasoning model served on the SayGM inference subnet (Bittensor), 1M context.",
params: {
model: "o4-mini",
contextLength: 1_000_000,
completionOptions: { maxTokens: 100_000 },
title: "o4 Mini",
},
providerOptions: ["saygm"],
icon: "saygm.svg",
isOpenSource: false,
},
gemini25Flash: {
title: "Gemini 2.5 Flash",
description:
Expand Down
31 changes: 31 additions & 0 deletions gui/src/pages/AddNewModel/configs/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,37 @@ export const providers: Partial<Record<string, ProviderInfo>> = {
],
apiKeyUrl: "https://z.ai/manage-apikey/apikey-list",
},
saygm: {
title: "SayGM",
provider: "saygm",
description:
"Frontier models (GPT-5.x, o-series) served by the SayGM inference subnet on Bittensor",
longDescription: `[SayGM](https://saygm.com) is a decentralized inference subnet on Bittensor serving frontier models over an OpenAI-compatible API. Sign up at [saygm.com](https://saygm.com) to create an API key.`,
icon: "saygm.svg",
tags: [ModelProviderTags.RequiresApiKey],
collectInputFor: [
{
inputType: "text",
key: "apiKey",
label: "API Key",
placeholder: "Enter your SayGM API key",
required: true,
},
...completionParamsInputsConfigs,
],
packages: [
models.saygmGpt5_6Sol,
models.saygmGpt5_6Terra,
models.saygmGpt5_6Luna,
models.saygmGpt5_5,
models.saygmGpt5_4,
models.saygmGpt5_4Mini,
models.saygmGpt5_4Nano,
models.saygmO3,
models.saygmO4Mini,
],
apiKeyUrl: "https://saygm.com",
},
"function-network": {
title: "Function Network",
provider: "function-network",
Expand Down
2 changes: 2 additions & 0 deletions packages/llm-info/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Bedrock } from "./providers/bedrock.js";
import { Cohere } from "./providers/cohere.js";
import { CometAPI } from "./providers/cometapi.js";
import { Gemini } from "./providers/gemini.js";
import { Saygm } from "./providers/saygm.js";
import { Inception } from "./providers/inception.js";
import { MiniMax } from "./providers/minimax.js";
import { Mistral } from "./providers/mistral.js";
Expand All @@ -18,6 +19,7 @@ import { LlmInfoWithProvider, ModelProvider, UseCase } from "./types.js";
export const allModelProviders: ModelProvider[] = [
OpenAi,
Gemini,
Saygm,
Anthropic,
Mistral,
Voyage,
Expand Down
Loading
Loading