cursor-oauth-opencode
Advanced tools
+39
-8
@@ -23,3 +23,3 @@ #!/usr/bin/env node | ||
| tool_call: true, | ||
| limit: { context: 200000, output: 64000 } | ||
| limit: { context: 200000, input: 200000, output: 64000 } | ||
| }, | ||
@@ -32,3 +32,3 @@ "composer-2": { | ||
| tool_call: true, | ||
| limit: { context: 200000, output: 64000 } | ||
| limit: { context: 200000, input: 200000, output: 64000 } | ||
| }, | ||
@@ -41,3 +41,3 @@ "claude-4.6-sonnet": { | ||
| tool_call: true, | ||
| limit: { context: 200000, output: 64000 } | ||
| limit: { context: 200000, input: 200000, output: 64000 } | ||
| }, | ||
@@ -50,5 +50,39 @@ "gpt-5.3-codex": { | ||
| tool_call: true, | ||
| limit: { context: 400000, output: 128000 } | ||
| limit: { context: 400000, input: 400000, output: 128000 } | ||
| } | ||
| }; | ||
| var GENERATED_MODEL_KEYS = new Set([ | ||
| "name", | ||
| "reasoning", | ||
| "temperature", | ||
| "attachment", | ||
| "tool_call", | ||
| "limit" | ||
| ]); | ||
| function isRecord(value) { | ||
| return typeof value === "object" && value !== null && !Array.isArray(value); | ||
| } | ||
| function sanitizeGeneratedModelOverride(override) { | ||
| if (!isRecord(override)) | ||
| return {}; | ||
| const sanitized = { ...override }; | ||
| for (const key of GENERATED_MODEL_KEYS) | ||
| delete sanitized[key]; | ||
| return sanitized; | ||
| } | ||
| function providerModelsWithRepairs(existingModels) { | ||
| const models = {}; | ||
| for (const [id, model] of Object.entries(CURSOR_MODELS)) { | ||
| models[id] = { | ||
| ...model, | ||
| ...sanitizeGeneratedModelOverride(existingModels[id]) | ||
| }; | ||
| } | ||
| for (const [id, model] of Object.entries(existingModels)) { | ||
| if (id in CURSOR_MODELS) | ||
| continue; | ||
| models[id] = model; | ||
| } | ||
| return models; | ||
| } | ||
| function globalConfigPath() { | ||
@@ -101,6 +135,3 @@ const configHome = process.env.XDG_CONFIG_HOME ?? path.join(os.homedir(), ".config"); | ||
| api: existingProvider.api ?? PROVIDER_API, | ||
| models: { | ||
| ...CURSOR_MODELS, | ||
| ...existingModels | ||
| } | ||
| models: providerModelsWithRepairs(existingModels) | ||
| }); | ||
@@ -107,0 +138,0 @@ return applyEdits(text, format(text, undefined, { |
+1
-0
@@ -254,2 +254,3 @@ import { tool } from "@opencode-ai/plugin"; | ||
| context: model.contextWindow, | ||
| input: model.contextWindow, | ||
| output: model.maxTokens, | ||
@@ -256,0 +257,0 @@ }, |
+1
-1
| { | ||
| "name": "cursor-oauth-opencode", | ||
| "version": "0.1.7", | ||
| "version": "0.1.8", | ||
| "description": "OpenCode plugin that connects Cursor's API to OpenCode via OAuth, model discovery, and a local OpenAI-compatible proxy.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
801009
0.12%21358
0.15%