From f2761cf28ee62d421a6baa9d935a16269c71a72c Mon Sep 17 00:00:00 2001
From: Mark Davison <6168730+markdavison@users.noreply.github.com>
Date: Tue, 11 Aug 2026 17:50:14 +0100
Subject: [PATCH 1/9] Add gm provider with frontier model catalog
---
providers/gm/logo.svg | 4 ++++
providers/gm/models/claude-fable-5.toml | 11 +++++++++++
providers/gm/models/claude-haiku-4-5.toml | 11 +++++++++++
providers/gm/models/claude-opus-4-7.toml | 11 +++++++++++
providers/gm/models/claude-opus-4-8.toml | 11 +++++++++++
providers/gm/models/claude-opus-5.toml | 11 +++++++++++
providers/gm/models/claude-sonnet-4-6.toml | 15 +++++++++++++++
providers/gm/models/claude-sonnet-5.toml | 16 ++++++++++++++++
providers/gm/models/gemini-2.5-flash-lite.toml | 16 ++++++++++++++++
providers/gm/models/gemini-2.5-flash.toml | 16 ++++++++++++++++
providers/gm/models/gemini-2.5-pro.toml | 12 ++++++++++++
providers/gm/models/gemini-3.1-pro-preview.toml | 11 +++++++++++
providers/gm/models/gemini-3.5-flash.toml | 11 +++++++++++
providers/gm/models/gpt-5.4-mini.toml | 11 +++++++++++
providers/gm/models/gpt-5.4-nano.toml | 11 +++++++++++
providers/gm/models/gpt-5.4.toml | 11 +++++++++++
providers/gm/models/gpt-5.5-pro.toml | 11 +++++++++++
providers/gm/models/gpt-5.5.toml | 11 +++++++++++
providers/gm/models/gpt-5.6-luna.toml | 11 +++++++++++
providers/gm/models/gpt-5.6-sol.toml | 11 +++++++++++
providers/gm/models/gpt-5.6-terra.toml | 11 +++++++++++
providers/gm/models/gpt-5.6.toml | 12 ++++++++++++
providers/gm/models/o3.toml | 11 +++++++++++
providers/gm/models/o4-mini.toml | 11 +++++++++++
providers/gm/provider.toml | 5 +++++
25 files changed, 283 insertions(+)
create mode 100644 providers/gm/logo.svg
create mode 100644 providers/gm/models/claude-fable-5.toml
create mode 100644 providers/gm/models/claude-haiku-4-5.toml
create mode 100644 providers/gm/models/claude-opus-4-7.toml
create mode 100644 providers/gm/models/claude-opus-4-8.toml
create mode 100644 providers/gm/models/claude-opus-5.toml
create mode 100644 providers/gm/models/claude-sonnet-4-6.toml
create mode 100644 providers/gm/models/claude-sonnet-5.toml
create mode 100644 providers/gm/models/gemini-2.5-flash-lite.toml
create mode 100644 providers/gm/models/gemini-2.5-flash.toml
create mode 100644 providers/gm/models/gemini-2.5-pro.toml
create mode 100644 providers/gm/models/gemini-3.1-pro-preview.toml
create mode 100644 providers/gm/models/gemini-3.5-flash.toml
create mode 100644 providers/gm/models/gpt-5.4-mini.toml
create mode 100644 providers/gm/models/gpt-5.4-nano.toml
create mode 100644 providers/gm/models/gpt-5.4.toml
create mode 100644 providers/gm/models/gpt-5.5-pro.toml
create mode 100644 providers/gm/models/gpt-5.5.toml
create mode 100644 providers/gm/models/gpt-5.6-luna.toml
create mode 100644 providers/gm/models/gpt-5.6-sol.toml
create mode 100644 providers/gm/models/gpt-5.6-terra.toml
create mode 100644 providers/gm/models/gpt-5.6.toml
create mode 100644 providers/gm/models/o3.toml
create mode 100644 providers/gm/models/o4-mini.toml
create mode 100644 providers/gm/provider.toml
diff --git a/providers/gm/logo.svg b/providers/gm/logo.svg
new file mode 100644
index 00000000000..497f15af61b
--- /dev/null
+++ b/providers/gm/logo.svg
@@ -0,0 +1,4 @@
+
diff --git a/providers/gm/models/claude-fable-5.toml b/providers/gm/models/claude-fable-5.toml
new file mode 100644
index 00000000000..fee61c53146
--- /dev/null
+++ b/providers/gm/models/claude-fable-5.toml
@@ -0,0 +1,11 @@
+# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+base_model = "anthropic/claude-fable-5"
+
+[[reasoning_options]]
+type = "effort"
+values = ["low", "medium", "high", "xhigh", "max"]
+
+[cost]
+input = 10.00
+output = 50.00
+cache_read = 1.00
diff --git a/providers/gm/models/claude-haiku-4-5.toml b/providers/gm/models/claude-haiku-4-5.toml
new file mode 100644
index 00000000000..80f540c6d0b
--- /dev/null
+++ b/providers/gm/models/claude-haiku-4-5.toml
@@ -0,0 +1,11 @@
+# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+base_model = "anthropic/claude-haiku-4-5"
+
+[[reasoning_options]]
+type = "budget_tokens"
+min = 1_024
+
+[cost]
+input = 1.00
+output = 5.00
+cache_read = 0.10
diff --git a/providers/gm/models/claude-opus-4-7.toml b/providers/gm/models/claude-opus-4-7.toml
new file mode 100644
index 00000000000..21a5b0eb372
--- /dev/null
+++ b/providers/gm/models/claude-opus-4-7.toml
@@ -0,0 +1,11 @@
+# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+base_model = "anthropic/claude-opus-4-7"
+
+[[reasoning_options]]
+type = "effort"
+values = ["low", "medium", "high", "xhigh", "max"]
+
+[cost]
+input = 5.00
+output = 25.00
+cache_read = 0.50
diff --git a/providers/gm/models/claude-opus-4-8.toml b/providers/gm/models/claude-opus-4-8.toml
new file mode 100644
index 00000000000..c758260b948
--- /dev/null
+++ b/providers/gm/models/claude-opus-4-8.toml
@@ -0,0 +1,11 @@
+# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+base_model = "anthropic/claude-opus-4-8"
+
+[[reasoning_options]]
+type = "effort"
+values = ["low", "medium", "high", "xhigh", "max"]
+
+[cost]
+input = 5.00
+output = 25.00
+cache_read = 0.50
diff --git a/providers/gm/models/claude-opus-5.toml b/providers/gm/models/claude-opus-5.toml
new file mode 100644
index 00000000000..5e98c889b3d
--- /dev/null
+++ b/providers/gm/models/claude-opus-5.toml
@@ -0,0 +1,11 @@
+# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+base_model = "anthropic/claude-opus-5"
+
+[[reasoning_options]]
+type = "effort"
+values = ["low", "medium", "high", "xhigh", "max"]
+
+[cost]
+input = 5.00
+output = 25.00
+cache_read = 0.50
diff --git a/providers/gm/models/claude-sonnet-4-6.toml b/providers/gm/models/claude-sonnet-4-6.toml
new file mode 100644
index 00000000000..320fade3362
--- /dev/null
+++ b/providers/gm/models/claude-sonnet-4-6.toml
@@ -0,0 +1,15 @@
+# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+base_model = "anthropic/claude-sonnet-4-6"
+
+[[reasoning_options]]
+type = "effort"
+values = ["low", "medium", "high", "max"]
+
+[[reasoning_options]]
+type = "budget_tokens"
+min = 1_024
+
+[cost]
+input = 3.00
+output = 10.00
+cache_read = 0.30
diff --git a/providers/gm/models/claude-sonnet-5.toml b/providers/gm/models/claude-sonnet-5.toml
new file mode 100644
index 00000000000..4deb1ee0d84
--- /dev/null
+++ b/providers/gm/models/claude-sonnet-5.toml
@@ -0,0 +1,16 @@
+# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+# Toggle: thinking.type = enabled|disabled (Anthropic Messages wire; gm mirrors upstream)
+# Effort: output_config.effort = low|medium|high|xhigh|max
+base_model = "anthropic/claude-sonnet-5"
+
+[[reasoning_options]]
+type = "toggle"
+
+[[reasoning_options]]
+type = "effort"
+values = ["low", "medium", "high", "xhigh", "max"]
+
+[cost]
+input = 3.00
+output = 10.00
+cache_read = 0.30
diff --git a/providers/gm/models/gemini-2.5-flash-lite.toml b/providers/gm/models/gemini-2.5-flash-lite.toml
new file mode 100644
index 00000000000..e11dd55adea
--- /dev/null
+++ b/providers/gm/models/gemini-2.5-flash-lite.toml
@@ -0,0 +1,16 @@
+# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+# Toggle: thinking budget 0 disables thinking (Google thinkingConfig.thinkingBudget)
+base_model = "google/gemini-2.5-flash-lite"
+
+[[reasoning_options]]
+type = "toggle"
+
+[[reasoning_options]]
+type = "budget_tokens"
+min = 512
+max = 24_576
+
+[cost]
+input = 0.10
+output = 0.40
+cache_read = 0.01
diff --git a/providers/gm/models/gemini-2.5-flash.toml b/providers/gm/models/gemini-2.5-flash.toml
new file mode 100644
index 00000000000..3f24c3b65ab
--- /dev/null
+++ b/providers/gm/models/gemini-2.5-flash.toml
@@ -0,0 +1,16 @@
+# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+# Toggle: thinking budget 0 disables thinking (Google thinkingConfig.thinkingBudget)
+base_model = "google/gemini-2.5-flash"
+
+[[reasoning_options]]
+type = "toggle"
+
+[[reasoning_options]]
+type = "budget_tokens"
+min = 0
+max = 24_576
+
+[cost]
+input = 0.30
+output = 2.50
+cache_read = 0.03
diff --git a/providers/gm/models/gemini-2.5-pro.toml b/providers/gm/models/gemini-2.5-pro.toml
new file mode 100644
index 00000000000..8d7cd04db04
--- /dev/null
+++ b/providers/gm/models/gemini-2.5-pro.toml
@@ -0,0 +1,12 @@
+# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+base_model = "google/gemini-2.5-pro"
+
+[[reasoning_options]]
+type = "budget_tokens"
+min = 128
+max = 32_768
+
+[cost]
+input = 1.25
+output = 10.00
+cache_read = 0.125
diff --git a/providers/gm/models/gemini-3.1-pro-preview.toml b/providers/gm/models/gemini-3.1-pro-preview.toml
new file mode 100644
index 00000000000..824a0cec0ff
--- /dev/null
+++ b/providers/gm/models/gemini-3.1-pro-preview.toml
@@ -0,0 +1,11 @@
+# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+base_model = "google/gemini-3.1-pro-preview"
+
+[[reasoning_options]]
+type = "effort"
+values = ["low", "medium", "high"]
+
+[cost]
+input = 2.00
+output = 12.00
+cache_read = 0.20
diff --git a/providers/gm/models/gemini-3.5-flash.toml b/providers/gm/models/gemini-3.5-flash.toml
new file mode 100644
index 00000000000..a3970204686
--- /dev/null
+++ b/providers/gm/models/gemini-3.5-flash.toml
@@ -0,0 +1,11 @@
+# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+base_model = "google/gemini-3.5-flash"
+
+[[reasoning_options]]
+type = "effort"
+values = ["minimal", "low", "medium", "high"]
+
+[cost]
+input = 1.50
+output = 9.00
+cache_read = 0.15
diff --git a/providers/gm/models/gpt-5.4-mini.toml b/providers/gm/models/gpt-5.4-mini.toml
new file mode 100644
index 00000000000..539df3376d1
--- /dev/null
+++ b/providers/gm/models/gpt-5.4-mini.toml
@@ -0,0 +1,11 @@
+# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+base_model = "openai/gpt-5.4-mini"
+
+[[reasoning_options]]
+type = "effort"
+values = ["none", "low", "medium", "high", "xhigh"]
+
+[cost]
+input = 0.75
+output = 4.50
+cache_read = 0.075
diff --git a/providers/gm/models/gpt-5.4-nano.toml b/providers/gm/models/gpt-5.4-nano.toml
new file mode 100644
index 00000000000..3616af572d8
--- /dev/null
+++ b/providers/gm/models/gpt-5.4-nano.toml
@@ -0,0 +1,11 @@
+# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+base_model = "openai/gpt-5.4-nano"
+
+[[reasoning_options]]
+type = "effort"
+values = ["none", "low", "medium", "high", "xhigh"]
+
+[cost]
+input = 0.20
+output = 1.25
+cache_read = 0.02
diff --git a/providers/gm/models/gpt-5.4.toml b/providers/gm/models/gpt-5.4.toml
new file mode 100644
index 00000000000..3fd379904e4
--- /dev/null
+++ b/providers/gm/models/gpt-5.4.toml
@@ -0,0 +1,11 @@
+# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+base_model = "openai/gpt-5.4"
+
+[[reasoning_options]]
+type = "effort"
+values = ["none", "low", "medium", "high", "xhigh"]
+
+[cost]
+input = 2.50
+output = 15.00
+cache_read = 0.25
diff --git a/providers/gm/models/gpt-5.5-pro.toml b/providers/gm/models/gpt-5.5-pro.toml
new file mode 100644
index 00000000000..122aa6b0ab1
--- /dev/null
+++ b/providers/gm/models/gpt-5.5-pro.toml
@@ -0,0 +1,11 @@
+# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+base_model = "openai/gpt-5.5-pro"
+
+[[reasoning_options]]
+type = "effort"
+values = ["medium", "high", "xhigh"]
+
+[cost]
+input = 30.00
+output = 180.00
+cache_read = 3.00
diff --git a/providers/gm/models/gpt-5.5.toml b/providers/gm/models/gpt-5.5.toml
new file mode 100644
index 00000000000..d00f55c06f8
--- /dev/null
+++ b/providers/gm/models/gpt-5.5.toml
@@ -0,0 +1,11 @@
+# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+base_model = "openai/gpt-5.5"
+
+[[reasoning_options]]
+type = "effort"
+values = ["none", "low", "medium", "high", "xhigh"]
+
+[cost]
+input = 5.00
+output = 30.00
+cache_read = 0.50
diff --git a/providers/gm/models/gpt-5.6-luna.toml b/providers/gm/models/gpt-5.6-luna.toml
new file mode 100644
index 00000000000..3e9f1d15bc2
--- /dev/null
+++ b/providers/gm/models/gpt-5.6-luna.toml
@@ -0,0 +1,11 @@
+# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+base_model = "openai/gpt-5.6-luna"
+
+[[reasoning_options]]
+type = "effort"
+values = ["none", "low", "medium", "high", "xhigh", "max"]
+
+[cost]
+input = 0.20
+output = 1.20
+cache_read = 0.02
diff --git a/providers/gm/models/gpt-5.6-sol.toml b/providers/gm/models/gpt-5.6-sol.toml
new file mode 100644
index 00000000000..cffa80e30cf
--- /dev/null
+++ b/providers/gm/models/gpt-5.6-sol.toml
@@ -0,0 +1,11 @@
+# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+base_model = "openai/gpt-5.6-sol"
+
+[[reasoning_options]]
+type = "effort"
+values = ["none", "low", "medium", "high", "xhigh", "max"]
+
+[cost]
+input = 5.00
+output = 30.00
+cache_read = 0.50
diff --git a/providers/gm/models/gpt-5.6-terra.toml b/providers/gm/models/gpt-5.6-terra.toml
new file mode 100644
index 00000000000..b591c9b6e20
--- /dev/null
+++ b/providers/gm/models/gpt-5.6-terra.toml
@@ -0,0 +1,11 @@
+# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+base_model = "openai/gpt-5.6-terra"
+
+[[reasoning_options]]
+type = "effort"
+values = ["none", "low", "medium", "high", "xhigh", "max"]
+
+[cost]
+input = 2.00
+output = 12.00
+cache_read = 0.20
diff --git a/providers/gm/models/gpt-5.6.toml b/providers/gm/models/gpt-5.6.toml
new file mode 100644
index 00000000000..67fa78620c8
--- /dev/null
+++ b/providers/gm/models/gpt-5.6.toml
@@ -0,0 +1,12 @@
+# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok). gm mirrors upstream gpt-5.6 limits.
+base_model = "openai/gpt-5.6-sol"
+name = "GPT-5.6"
+
+[[reasoning_options]]
+type = "effort"
+values = ["none", "low", "medium", "high", "xhigh", "max"]
+
+[cost]
+input = 5.00
+output = 30.00
+cache_read = 0.50
diff --git a/providers/gm/models/o3.toml b/providers/gm/models/o3.toml
new file mode 100644
index 00000000000..5adb67fe808
--- /dev/null
+++ b/providers/gm/models/o3.toml
@@ -0,0 +1,11 @@
+# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+base_model = "openai/o3"
+
+[[reasoning_options]]
+type = "effort"
+values = ["low", "medium", "high"]
+
+[cost]
+input = 2.00
+output = 8.00
+cache_read = 0.50
diff --git a/providers/gm/models/o4-mini.toml b/providers/gm/models/o4-mini.toml
new file mode 100644
index 00000000000..f23c7a50596
--- /dev/null
+++ b/providers/gm/models/o4-mini.toml
@@ -0,0 +1,11 @@
+# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+base_model = "openai/o4-mini"
+
+[[reasoning_options]]
+type = "effort"
+values = ["low", "medium", "high"]
+
+[cost]
+input = 1.10
+output = 4.40
+cache_read = 0.275
diff --git a/providers/gm/provider.toml b/providers/gm/provider.toml
new file mode 100644
index 00000000000..1e8e3edce20
--- /dev/null
+++ b/providers/gm/provider.toml
@@ -0,0 +1,5 @@
+name = "gm"
+npm = "@ai-sdk/openai-compatible"
+env = ["GM_API_KEY"]
+api = "https://api.saygm.com/v1"
+doc = "https://saygm.com"
From c22a4eded3f3dc69c6dc86fdc85bd05250612b77 Mon Sep 17 00:00:00 2001
From: Mark Davison <6168730+markdavison@users.noreply.github.com>
Date: Tue, 11 Aug 2026 17:50:14 +0100
Subject: [PATCH 2/9] Trim gm provider to currently available models
---
providers/gm/models/gemini-2.5-flash-lite.toml | 16 ----------------
providers/gm/models/gemini-2.5-flash.toml | 16 ----------------
providers/gm/models/gemini-2.5-pro.toml | 12 ------------
providers/gm/models/gemini-3.1-pro-preview.toml | 11 -----------
providers/gm/models/gemini-3.5-flash.toml | 11 -----------
providers/gm/models/gpt-5.6.toml | 12 ------------
6 files changed, 78 deletions(-)
delete mode 100644 providers/gm/models/gemini-2.5-flash-lite.toml
delete mode 100644 providers/gm/models/gemini-2.5-flash.toml
delete mode 100644 providers/gm/models/gemini-2.5-pro.toml
delete mode 100644 providers/gm/models/gemini-3.1-pro-preview.toml
delete mode 100644 providers/gm/models/gemini-3.5-flash.toml
delete mode 100644 providers/gm/models/gpt-5.6.toml
diff --git a/providers/gm/models/gemini-2.5-flash-lite.toml b/providers/gm/models/gemini-2.5-flash-lite.toml
deleted file mode 100644
index e11dd55adea..00000000000
--- a/providers/gm/models/gemini-2.5-flash-lite.toml
+++ /dev/null
@@ -1,16 +0,0 @@
-# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
-# Toggle: thinking budget 0 disables thinking (Google thinkingConfig.thinkingBudget)
-base_model = "google/gemini-2.5-flash-lite"
-
-[[reasoning_options]]
-type = "toggle"
-
-[[reasoning_options]]
-type = "budget_tokens"
-min = 512
-max = 24_576
-
-[cost]
-input = 0.10
-output = 0.40
-cache_read = 0.01
diff --git a/providers/gm/models/gemini-2.5-flash.toml b/providers/gm/models/gemini-2.5-flash.toml
deleted file mode 100644
index 3f24c3b65ab..00000000000
--- a/providers/gm/models/gemini-2.5-flash.toml
+++ /dev/null
@@ -1,16 +0,0 @@
-# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
-# Toggle: thinking budget 0 disables thinking (Google thinkingConfig.thinkingBudget)
-base_model = "google/gemini-2.5-flash"
-
-[[reasoning_options]]
-type = "toggle"
-
-[[reasoning_options]]
-type = "budget_tokens"
-min = 0
-max = 24_576
-
-[cost]
-input = 0.30
-output = 2.50
-cache_read = 0.03
diff --git a/providers/gm/models/gemini-2.5-pro.toml b/providers/gm/models/gemini-2.5-pro.toml
deleted file mode 100644
index 8d7cd04db04..00000000000
--- a/providers/gm/models/gemini-2.5-pro.toml
+++ /dev/null
@@ -1,12 +0,0 @@
-# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
-base_model = "google/gemini-2.5-pro"
-
-[[reasoning_options]]
-type = "budget_tokens"
-min = 128
-max = 32_768
-
-[cost]
-input = 1.25
-output = 10.00
-cache_read = 0.125
diff --git a/providers/gm/models/gemini-3.1-pro-preview.toml b/providers/gm/models/gemini-3.1-pro-preview.toml
deleted file mode 100644
index 824a0cec0ff..00000000000
--- a/providers/gm/models/gemini-3.1-pro-preview.toml
+++ /dev/null
@@ -1,11 +0,0 @@
-# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
-base_model = "google/gemini-3.1-pro-preview"
-
-[[reasoning_options]]
-type = "effort"
-values = ["low", "medium", "high"]
-
-[cost]
-input = 2.00
-output = 12.00
-cache_read = 0.20
diff --git a/providers/gm/models/gemini-3.5-flash.toml b/providers/gm/models/gemini-3.5-flash.toml
deleted file mode 100644
index a3970204686..00000000000
--- a/providers/gm/models/gemini-3.5-flash.toml
+++ /dev/null
@@ -1,11 +0,0 @@
-# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
-base_model = "google/gemini-3.5-flash"
-
-[[reasoning_options]]
-type = "effort"
-values = ["minimal", "low", "medium", "high"]
-
-[cost]
-input = 1.50
-output = 9.00
-cache_read = 0.15
diff --git a/providers/gm/models/gpt-5.6.toml b/providers/gm/models/gpt-5.6.toml
deleted file mode 100644
index 67fa78620c8..00000000000
--- a/providers/gm/models/gpt-5.6.toml
+++ /dev/null
@@ -1,12 +0,0 @@
-# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok). gm mirrors upstream gpt-5.6 limits.
-base_model = "openai/gpt-5.6-sol"
-name = "GPT-5.6"
-
-[[reasoning_options]]
-type = "effort"
-values = ["none", "low", "medium", "high", "xhigh", "max"]
-
-[cost]
-input = 5.00
-output = 30.00
-cache_read = 0.50
From 00acb3419f0057354e269101b03e28026e768c31 Mon Sep 17 00:00:00 2001
From: Mark Davison <6168730+markdavison@users.noreply.github.com>
Date: Tue, 11 Aug 2026 17:50:14 +0100
Subject: [PATCH 3/9] Fix gm adapter routing: claude via anthropic, gpt-5.5-pro
via responses
---
providers/gm/models/claude-fable-5.toml | 4 ++++
providers/gm/models/claude-haiku-4-5.toml | 4 ++++
providers/gm/models/claude-opus-4-7.toml | 4 ++++
providers/gm/models/claude-opus-4-8.toml | 4 ++++
providers/gm/models/claude-opus-5.toml | 4 ++++
providers/gm/models/claude-sonnet-4-6.toml | 4 ++++
providers/gm/models/claude-sonnet-5.toml | 4 ++++
providers/gm/models/gpt-5.5-pro.toml | 6 ++++++
8 files changed, 34 insertions(+)
diff --git a/providers/gm/models/claude-fable-5.toml b/providers/gm/models/claude-fable-5.toml
index fee61c53146..d735c4bfb7a 100644
--- a/providers/gm/models/claude-fable-5.toml
+++ b/providers/gm/models/claude-fable-5.toml
@@ -9,3 +9,7 @@ values = ["low", "medium", "high", "xhigh", "max"]
input = 10.00
output = 50.00
cache_read = 1.00
+
+[provider]
+npm = "@ai-sdk/anthropic"
+api = "https://api.saygm.com/v1"
diff --git a/providers/gm/models/claude-haiku-4-5.toml b/providers/gm/models/claude-haiku-4-5.toml
index 80f540c6d0b..699f04def0e 100644
--- a/providers/gm/models/claude-haiku-4-5.toml
+++ b/providers/gm/models/claude-haiku-4-5.toml
@@ -9,3 +9,7 @@ min = 1_024
input = 1.00
output = 5.00
cache_read = 0.10
+
+[provider]
+npm = "@ai-sdk/anthropic"
+api = "https://api.saygm.com/v1"
diff --git a/providers/gm/models/claude-opus-4-7.toml b/providers/gm/models/claude-opus-4-7.toml
index 21a5b0eb372..6be2d00db8f 100644
--- a/providers/gm/models/claude-opus-4-7.toml
+++ b/providers/gm/models/claude-opus-4-7.toml
@@ -9,3 +9,7 @@ values = ["low", "medium", "high", "xhigh", "max"]
input = 5.00
output = 25.00
cache_read = 0.50
+
+[provider]
+npm = "@ai-sdk/anthropic"
+api = "https://api.saygm.com/v1"
diff --git a/providers/gm/models/claude-opus-4-8.toml b/providers/gm/models/claude-opus-4-8.toml
index c758260b948..05273bc635b 100644
--- a/providers/gm/models/claude-opus-4-8.toml
+++ b/providers/gm/models/claude-opus-4-8.toml
@@ -9,3 +9,7 @@ values = ["low", "medium", "high", "xhigh", "max"]
input = 5.00
output = 25.00
cache_read = 0.50
+
+[provider]
+npm = "@ai-sdk/anthropic"
+api = "https://api.saygm.com/v1"
diff --git a/providers/gm/models/claude-opus-5.toml b/providers/gm/models/claude-opus-5.toml
index 5e98c889b3d..8afbf7f02f7 100644
--- a/providers/gm/models/claude-opus-5.toml
+++ b/providers/gm/models/claude-opus-5.toml
@@ -9,3 +9,7 @@ values = ["low", "medium", "high", "xhigh", "max"]
input = 5.00
output = 25.00
cache_read = 0.50
+
+[provider]
+npm = "@ai-sdk/anthropic"
+api = "https://api.saygm.com/v1"
diff --git a/providers/gm/models/claude-sonnet-4-6.toml b/providers/gm/models/claude-sonnet-4-6.toml
index 320fade3362..ff792615f72 100644
--- a/providers/gm/models/claude-sonnet-4-6.toml
+++ b/providers/gm/models/claude-sonnet-4-6.toml
@@ -13,3 +13,7 @@ min = 1_024
input = 3.00
output = 10.00
cache_read = 0.30
+
+[provider]
+npm = "@ai-sdk/anthropic"
+api = "https://api.saygm.com/v1"
diff --git a/providers/gm/models/claude-sonnet-5.toml b/providers/gm/models/claude-sonnet-5.toml
index 4deb1ee0d84..970a306e2c5 100644
--- a/providers/gm/models/claude-sonnet-5.toml
+++ b/providers/gm/models/claude-sonnet-5.toml
@@ -14,3 +14,7 @@ values = ["low", "medium", "high", "xhigh", "max"]
input = 3.00
output = 10.00
cache_read = 0.30
+
+[provider]
+npm = "@ai-sdk/anthropic"
+api = "https://api.saygm.com/v1"
diff --git a/providers/gm/models/gpt-5.5-pro.toml b/providers/gm/models/gpt-5.5-pro.toml
index 122aa6b0ab1..1988021cf69 100644
--- a/providers/gm/models/gpt-5.5-pro.toml
+++ b/providers/gm/models/gpt-5.5-pro.toml
@@ -1,4 +1,5 @@
# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+# Served only on the Responses API (gm /v1/models api_shapes = ["responses"]).
base_model = "openai/gpt-5.5-pro"
[[reasoning_options]]
@@ -9,3 +10,8 @@ values = ["medium", "high", "xhigh"]
input = 30.00
output = 180.00
cache_read = 3.00
+
+[provider]
+npm = "@ai-sdk/openai"
+api = "https://api.saygm.com/v1"
+shape = "responses"
From 5635bc4689d41ce3cd811d7a6bdb1b7cdfecf9e0 Mon Sep 17 00:00:00 2001
From: Mark Davison <6168730+markdavison@users.noreply.github.com>
Date: Tue, 11 Aug 2026 17:50:14 +0100
Subject: [PATCH 4/9] Rename gm provider to SayGM
---
providers/{gm => saygm}/logo.svg | 0
providers/{gm => saygm}/models/claude-fable-5.toml | 2 +-
providers/{gm => saygm}/models/claude-haiku-4-5.toml | 2 +-
providers/{gm => saygm}/models/claude-opus-4-7.toml | 2 +-
providers/{gm => saygm}/models/claude-opus-4-8.toml | 2 +-
providers/{gm => saygm}/models/claude-opus-5.toml | 2 +-
providers/{gm => saygm}/models/claude-sonnet-4-6.toml | 2 +-
providers/{gm => saygm}/models/claude-sonnet-5.toml | 4 ++--
providers/{gm => saygm}/models/gpt-5.4-mini.toml | 2 +-
providers/{gm => saygm}/models/gpt-5.4-nano.toml | 2 +-
providers/{gm => saygm}/models/gpt-5.4.toml | 2 +-
providers/{gm => saygm}/models/gpt-5.5-pro.toml | 4 ++--
providers/{gm => saygm}/models/gpt-5.5.toml | 2 +-
providers/{gm => saygm}/models/gpt-5.6-luna.toml | 2 +-
providers/{gm => saygm}/models/gpt-5.6-sol.toml | 2 +-
providers/{gm => saygm}/models/gpt-5.6-terra.toml | 2 +-
providers/{gm => saygm}/models/o3.toml | 2 +-
providers/{gm => saygm}/models/o4-mini.toml | 2 +-
providers/{gm => saygm}/provider.toml | 4 ++--
19 files changed, 21 insertions(+), 21 deletions(-)
rename providers/{gm => saygm}/logo.svg (100%)
rename providers/{gm => saygm}/models/claude-fable-5.toml (80%)
rename providers/{gm => saygm}/models/claude-haiku-4-5.toml (78%)
rename providers/{gm => saygm}/models/claude-opus-4-7.toml (80%)
rename providers/{gm => saygm}/models/claude-opus-4-8.toml (80%)
rename providers/{gm => saygm}/models/claude-opus-5.toml (80%)
rename providers/{gm => saygm}/models/claude-sonnet-4-6.toml (82%)
rename providers/{gm => saygm}/models/claude-sonnet-5.toml (81%)
rename providers/{gm => saygm}/models/gpt-5.4-mini.toml (74%)
rename providers/{gm => saygm}/models/gpt-5.4-nano.toml (73%)
rename providers/{gm => saygm}/models/gpt-5.4.toml (73%)
rename providers/{gm => saygm}/models/gpt-5.5-pro.toml (63%)
rename providers/{gm => saygm}/models/gpt-5.5.toml (73%)
rename providers/{gm => saygm}/models/gpt-5.6-luna.toml (74%)
rename providers/{gm => saygm}/models/gpt-5.6-sol.toml (74%)
rename providers/{gm => saygm}/models/gpt-5.6-terra.toml (74%)
rename providers/{gm => saygm}/models/o3.toml (70%)
rename providers/{gm => saygm}/models/o4-mini.toml (71%)
rename providers/{gm => saygm}/provider.toml (70%)
diff --git a/providers/gm/logo.svg b/providers/saygm/logo.svg
similarity index 100%
rename from providers/gm/logo.svg
rename to providers/saygm/logo.svg
diff --git a/providers/gm/models/claude-fable-5.toml b/providers/saygm/models/claude-fable-5.toml
similarity index 80%
rename from providers/gm/models/claude-fable-5.toml
rename to providers/saygm/models/claude-fable-5.toml
index d735c4bfb7a..409738b53a3 100644
--- a/providers/gm/models/claude-fable-5.toml
+++ b/providers/saygm/models/claude-fable-5.toml
@@ -1,4 +1,4 @@
-# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+# Source: SayGM live /v1/models catalog 2026-08-07 (USD/MTok).
base_model = "anthropic/claude-fable-5"
[[reasoning_options]]
diff --git a/providers/gm/models/claude-haiku-4-5.toml b/providers/saygm/models/claude-haiku-4-5.toml
similarity index 78%
rename from providers/gm/models/claude-haiku-4-5.toml
rename to providers/saygm/models/claude-haiku-4-5.toml
index 699f04def0e..46538056c59 100644
--- a/providers/gm/models/claude-haiku-4-5.toml
+++ b/providers/saygm/models/claude-haiku-4-5.toml
@@ -1,4 +1,4 @@
-# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+# Source: SayGM live /v1/models catalog 2026-08-07 (USD/MTok).
base_model = "anthropic/claude-haiku-4-5"
[[reasoning_options]]
diff --git a/providers/gm/models/claude-opus-4-7.toml b/providers/saygm/models/claude-opus-4-7.toml
similarity index 80%
rename from providers/gm/models/claude-opus-4-7.toml
rename to providers/saygm/models/claude-opus-4-7.toml
index 6be2d00db8f..fdf48ecb2e6 100644
--- a/providers/gm/models/claude-opus-4-7.toml
+++ b/providers/saygm/models/claude-opus-4-7.toml
@@ -1,4 +1,4 @@
-# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+# Source: SayGM live /v1/models catalog 2026-08-07 (USD/MTok).
base_model = "anthropic/claude-opus-4-7"
[[reasoning_options]]
diff --git a/providers/gm/models/claude-opus-4-8.toml b/providers/saygm/models/claude-opus-4-8.toml
similarity index 80%
rename from providers/gm/models/claude-opus-4-8.toml
rename to providers/saygm/models/claude-opus-4-8.toml
index 05273bc635b..5f8ad18a255 100644
--- a/providers/gm/models/claude-opus-4-8.toml
+++ b/providers/saygm/models/claude-opus-4-8.toml
@@ -1,4 +1,4 @@
-# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+# Source: SayGM live /v1/models catalog 2026-08-07 (USD/MTok).
base_model = "anthropic/claude-opus-4-8"
[[reasoning_options]]
diff --git a/providers/gm/models/claude-opus-5.toml b/providers/saygm/models/claude-opus-5.toml
similarity index 80%
rename from providers/gm/models/claude-opus-5.toml
rename to providers/saygm/models/claude-opus-5.toml
index 8afbf7f02f7..f4cf7b48617 100644
--- a/providers/gm/models/claude-opus-5.toml
+++ b/providers/saygm/models/claude-opus-5.toml
@@ -1,4 +1,4 @@
-# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+# Source: SayGM live /v1/models catalog 2026-08-07 (USD/MTok).
base_model = "anthropic/claude-opus-5"
[[reasoning_options]]
diff --git a/providers/gm/models/claude-sonnet-4-6.toml b/providers/saygm/models/claude-sonnet-4-6.toml
similarity index 82%
rename from providers/gm/models/claude-sonnet-4-6.toml
rename to providers/saygm/models/claude-sonnet-4-6.toml
index ff792615f72..61bf2cab656 100644
--- a/providers/gm/models/claude-sonnet-4-6.toml
+++ b/providers/saygm/models/claude-sonnet-4-6.toml
@@ -1,4 +1,4 @@
-# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+# Source: SayGM live /v1/models catalog 2026-08-07 (USD/MTok).
base_model = "anthropic/claude-sonnet-4-6"
[[reasoning_options]]
diff --git a/providers/gm/models/claude-sonnet-5.toml b/providers/saygm/models/claude-sonnet-5.toml
similarity index 81%
rename from providers/gm/models/claude-sonnet-5.toml
rename to providers/saygm/models/claude-sonnet-5.toml
index 970a306e2c5..f0f08f3e003 100644
--- a/providers/gm/models/claude-sonnet-5.toml
+++ b/providers/saygm/models/claude-sonnet-5.toml
@@ -1,5 +1,5 @@
-# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
-# Toggle: thinking.type = enabled|disabled (Anthropic Messages wire; gm mirrors upstream)
+# Source: SayGM live /v1/models catalog 2026-08-07 (USD/MTok).
+# Toggle: thinking.type = enabled|disabled (Anthropic Messages wire; SayGM mirrors upstream)
# Effort: output_config.effort = low|medium|high|xhigh|max
base_model = "anthropic/claude-sonnet-5"
diff --git a/providers/gm/models/gpt-5.4-mini.toml b/providers/saygm/models/gpt-5.4-mini.toml
similarity index 74%
rename from providers/gm/models/gpt-5.4-mini.toml
rename to providers/saygm/models/gpt-5.4-mini.toml
index 539df3376d1..20971a4dea7 100644
--- a/providers/gm/models/gpt-5.4-mini.toml
+++ b/providers/saygm/models/gpt-5.4-mini.toml
@@ -1,4 +1,4 @@
-# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+# Source: SayGM live /v1/models catalog 2026-08-07 (USD/MTok).
base_model = "openai/gpt-5.4-mini"
[[reasoning_options]]
diff --git a/providers/gm/models/gpt-5.4-nano.toml b/providers/saygm/models/gpt-5.4-nano.toml
similarity index 73%
rename from providers/gm/models/gpt-5.4-nano.toml
rename to providers/saygm/models/gpt-5.4-nano.toml
index 3616af572d8..0576a19e08a 100644
--- a/providers/gm/models/gpt-5.4-nano.toml
+++ b/providers/saygm/models/gpt-5.4-nano.toml
@@ -1,4 +1,4 @@
-# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+# Source: SayGM live /v1/models catalog 2026-08-07 (USD/MTok).
base_model = "openai/gpt-5.4-nano"
[[reasoning_options]]
diff --git a/providers/gm/models/gpt-5.4.toml b/providers/saygm/models/gpt-5.4.toml
similarity index 73%
rename from providers/gm/models/gpt-5.4.toml
rename to providers/saygm/models/gpt-5.4.toml
index 3fd379904e4..754d1bc5189 100644
--- a/providers/gm/models/gpt-5.4.toml
+++ b/providers/saygm/models/gpt-5.4.toml
@@ -1,4 +1,4 @@
-# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+# Source: SayGM live /v1/models catalog 2026-08-07 (USD/MTok).
base_model = "openai/gpt-5.4"
[[reasoning_options]]
diff --git a/providers/gm/models/gpt-5.5-pro.toml b/providers/saygm/models/gpt-5.5-pro.toml
similarity index 63%
rename from providers/gm/models/gpt-5.5-pro.toml
rename to providers/saygm/models/gpt-5.5-pro.toml
index 1988021cf69..e6ebea7d2de 100644
--- a/providers/gm/models/gpt-5.5-pro.toml
+++ b/providers/saygm/models/gpt-5.5-pro.toml
@@ -1,5 +1,5 @@
-# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
-# Served only on the Responses API (gm /v1/models api_shapes = ["responses"]).
+# Source: SayGM live /v1/models catalog 2026-08-07 (USD/MTok).
+# Served only on the Responses API (SayGM /v1/models api_shapes = ["responses"]).
base_model = "openai/gpt-5.5-pro"
[[reasoning_options]]
diff --git a/providers/gm/models/gpt-5.5.toml b/providers/saygm/models/gpt-5.5.toml
similarity index 73%
rename from providers/gm/models/gpt-5.5.toml
rename to providers/saygm/models/gpt-5.5.toml
index d00f55c06f8..5aa603c46fc 100644
--- a/providers/gm/models/gpt-5.5.toml
+++ b/providers/saygm/models/gpt-5.5.toml
@@ -1,4 +1,4 @@
-# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+# Source: SayGM live /v1/models catalog 2026-08-07 (USD/MTok).
base_model = "openai/gpt-5.5"
[[reasoning_options]]
diff --git a/providers/gm/models/gpt-5.6-luna.toml b/providers/saygm/models/gpt-5.6-luna.toml
similarity index 74%
rename from providers/gm/models/gpt-5.6-luna.toml
rename to providers/saygm/models/gpt-5.6-luna.toml
index 3e9f1d15bc2..d07dbebc511 100644
--- a/providers/gm/models/gpt-5.6-luna.toml
+++ b/providers/saygm/models/gpt-5.6-luna.toml
@@ -1,4 +1,4 @@
-# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+# Source: SayGM live /v1/models catalog 2026-08-07 (USD/MTok).
base_model = "openai/gpt-5.6-luna"
[[reasoning_options]]
diff --git a/providers/gm/models/gpt-5.6-sol.toml b/providers/saygm/models/gpt-5.6-sol.toml
similarity index 74%
rename from providers/gm/models/gpt-5.6-sol.toml
rename to providers/saygm/models/gpt-5.6-sol.toml
index cffa80e30cf..2dafb9451bb 100644
--- a/providers/gm/models/gpt-5.6-sol.toml
+++ b/providers/saygm/models/gpt-5.6-sol.toml
@@ -1,4 +1,4 @@
-# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+# Source: SayGM live /v1/models catalog 2026-08-07 (USD/MTok).
base_model = "openai/gpt-5.6-sol"
[[reasoning_options]]
diff --git a/providers/gm/models/gpt-5.6-terra.toml b/providers/saygm/models/gpt-5.6-terra.toml
similarity index 74%
rename from providers/gm/models/gpt-5.6-terra.toml
rename to providers/saygm/models/gpt-5.6-terra.toml
index b591c9b6e20..59a12ea449b 100644
--- a/providers/gm/models/gpt-5.6-terra.toml
+++ b/providers/saygm/models/gpt-5.6-terra.toml
@@ -1,4 +1,4 @@
-# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+# Source: SayGM live /v1/models catalog 2026-08-07 (USD/MTok).
base_model = "openai/gpt-5.6-terra"
[[reasoning_options]]
diff --git a/providers/gm/models/o3.toml b/providers/saygm/models/o3.toml
similarity index 70%
rename from providers/gm/models/o3.toml
rename to providers/saygm/models/o3.toml
index 5adb67fe808..9d954cd0622 100644
--- a/providers/gm/models/o3.toml
+++ b/providers/saygm/models/o3.toml
@@ -1,4 +1,4 @@
-# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+# Source: SayGM live /v1/models catalog 2026-08-07 (USD/MTok).
base_model = "openai/o3"
[[reasoning_options]]
diff --git a/providers/gm/models/o4-mini.toml b/providers/saygm/models/o4-mini.toml
similarity index 71%
rename from providers/gm/models/o4-mini.toml
rename to providers/saygm/models/o4-mini.toml
index f23c7a50596..17d1b0c3ab9 100644
--- a/providers/gm/models/o4-mini.toml
+++ b/providers/saygm/models/o4-mini.toml
@@ -1,4 +1,4 @@
-# Source: gm live /v1/models catalog 2026-08-07 (USD/MTok).
+# Source: SayGM live /v1/models catalog 2026-08-07 (USD/MTok).
base_model = "openai/o4-mini"
[[reasoning_options]]
diff --git a/providers/gm/provider.toml b/providers/saygm/provider.toml
similarity index 70%
rename from providers/gm/provider.toml
rename to providers/saygm/provider.toml
index 1e8e3edce20..4b5786a9bc1 100644
--- a/providers/gm/provider.toml
+++ b/providers/saygm/provider.toml
@@ -1,5 +1,5 @@
-name = "gm"
+name = "SayGM"
npm = "@ai-sdk/openai-compatible"
-env = ["GM_API_KEY"]
+env = ["SAYGM_API_KEY"]
api = "https://api.saygm.com/v1"
doc = "https://saygm.com"
From 0e40b3d02f42cdec84f2a13d1855846a8cc06767 Mon Sep 17 00:00:00 2001
From: Mark Davison <6168730+markdavison@users.noreply.github.com>
Date: Tue, 11 Aug 2026 17:50:14 +0100
Subject: [PATCH 5/9] fix: correct SayGM integration metadata
---
providers/saygm/logo.svg | 9 ++++++---
providers/saygm/models/claude-fable-5.toml | 7 +------
providers/saygm/models/claude-haiku-4-5.toml | 7 +------
providers/saygm/models/claude-opus-4-7.toml | 7 +------
providers/saygm/models/claude-opus-4-8.toml | 7 +------
providers/saygm/models/claude-opus-5.toml | 7 +------
providers/saygm/models/claude-sonnet-4-6.toml | 7 +------
providers/saygm/models/claude-sonnet-5.toml | 7 +------
providers/saygm/models/gpt-5.4-mini.toml | 7 +------
providers/saygm/models/gpt-5.4-nano.toml | 7 +------
providers/saygm/models/gpt-5.4.toml | 7 +------
providers/saygm/models/gpt-5.5-pro.toml | 7 +------
providers/saygm/models/gpt-5.5.toml | 7 +------
providers/saygm/models/gpt-5.6-luna.toml | 7 +------
providers/saygm/models/gpt-5.6-sol.toml | 7 +------
providers/saygm/models/gpt-5.6-terra.toml | 7 +------
providers/saygm/models/o3.toml | 7 +------
providers/saygm/models/o4-mini.toml | 7 +------
18 files changed, 23 insertions(+), 105 deletions(-)
diff --git a/providers/saygm/logo.svg b/providers/saygm/logo.svg
index 497f15af61b..699db3d3cc0 100644
--- a/providers/saygm/logo.svg
+++ b/providers/saygm/logo.svg
@@ -1,4 +1,7 @@
-