Skip to content

Commit eda7aba

Browse files
committed
fix(ai): address PR code-yeongyu#193 review — re-port OAuth, protocol P1s, drop GLM ZCode
Re-port OAuth flows from utils/oauth to auth/oauth with bundledLoaders, route Cursor through Connect/protobuf ChatService, fix GitLab PAT exchange and gpt-5.1 chat-completions routing, delist Perplexity session OAuth from /login, exclude Google CCA providers from API-key login, remove unofficial GLM ZCode login, keep browser smoke Node-free, and update stale kimi-coding live-test model ids.
1 parent 70b27aa commit eda7aba

95 files changed

Lines changed: 1545 additions & 1176 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/ai/scripts/generate-models.ts

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2637,7 +2637,7 @@ async function generateModels() {
26372637
{
26382638
id: "default",
26392639
name: "Auto",
2640-
api: "openai-completions",
2640+
api: "cursor-connect",
26412641
provider: "cursor",
26422642
baseUrl: "https://api2.cursor.sh",
26432643
reasoning: false,
@@ -2662,7 +2662,7 @@ async function generateModels() {
26622662
{
26632663
id: "gpt-5.1-2025-11-13",
26642664
name: "GPT-5.1",
2665-
api: "openai-responses",
2665+
api: "openai-completions",
26662666
provider: "gitlab-duo",
26672667
baseUrl: "https://cloud.gitlab.com/ai/v1/proxy/openai/v1",
26682668
reasoning: true,
@@ -2695,27 +2695,6 @@ async function generateModels() {
26952695
contextWindow: 200000,
26962696
maxTokens: 64000,
26972697
},
2698-
{
2699-
id: "glm-5.2",
2700-
name: "GLM-5.2 (ZCode)",
2701-
api: "anthropic-messages",
2702-
provider: "glm-zcode",
2703-
baseUrl: "https://api.z.ai/api/anthropic",
2704-
headers: {
2705-
"User-Agent": "ZCode/3.1.2",
2706-
"X-Title": "Z Code@electron",
2707-
"HTTP-Referer": "https://zcode.z.ai",
2708-
"X-ZCode-Agent": "glm",
2709-
"X-ZCode-App-Version": "3.1.2",
2710-
"X-Release-Channel": "production",
2711-
},
2712-
reasoning: true,
2713-
thinkingLevelMap: { minimal: null, low: "high", medium: "high", high: "high", max: "max" },
2714-
input: ["text"],
2715-
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
2716-
contextWindow: 1000000,
2717-
maxTokens: 131072,
2718-
},
27192698
];
27202699
allModels.push(...oauthParityModels);
27212700

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import type { ProviderStreams } from "../types.ts";
2+
import { lazyApi } from "./lazy.ts";
3+
4+
export const cursorConnectApi = (): ProviderStreams =>
5+
lazyApi(() => import("./cursor-connect.ts").then((m) => m.cursorConnectStreams));

0 commit comments

Comments
 (0)