Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(cursor): fall back to session models on older cli versions #9922

Closedmaria-rckswants to merge 2 commits intomain fromrefs/pull/9922/headopened View on GitHub

Showing 3 changed files with 88 additions and 6 deletions.

x
0 of 3 viewed, 3 left
17 additions and 0 deletionsapps/server/scripts/acp-mock-agent.tsModified
View file
@@ -350,6 +350,17 @@
​
function modelState(): AcpSchema.SessionModelState {
+ if (process.env.T3_ACP_CURSOR_MODELS_ERROR === "missing") {
+ return {
+ currentModelId: " grok-4.6 ",
+ availableModels: [
+ { modelId: " grok-4.6 ", name: " Grok 4.6 " },
+ { modelId: "grok-mock-alt", name: " Grok Mock Alt " },
+ { modelId: "blank-name", name: " " },
+ { modelId: " ", name: "Invalid" },
+ ],
+ };
+ }
if (antigravityProfile) {
return { currentModelId, availableModels: antigravityModels };
@@ -1287,6 +1298,12 @@
if (method === "cursor/list_available_models") {
+ if (process.env.T3_ACP_CURSOR_MODELS_ERROR === "missing") {
+ return Effect.fail(AcpError.AcpRequestError.methodNotFound(method));
+ }
+ if (process.env.T3_ACP_CURSOR_MODELS_ERROR === "internal") {
+ return Effect.fail(AcpError.AcpRequestError.internalError("Mock model discovery failure"));
+ }
return Effect.succeed({