@rely-ai/caliber 1.30.2 → 1.30.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +10 -5
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -67,13 +67,13 @@ function resolveFromEnv() {
|
|
|
67
67
|
if (process.env.CALIBER_USE_CURSOR_SEAT === "1" || process.env.CALIBER_USE_CURSOR_SEAT === "true") {
|
|
68
68
|
return {
|
|
69
69
|
provider: "cursor",
|
|
70
|
-
model: DEFAULT_MODELS.cursor
|
|
70
|
+
model: process.env.CALIBER_MODEL || DEFAULT_MODELS.cursor
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
if (process.env.CALIBER_USE_CLAUDE_CLI === "1" || process.env.CALIBER_USE_CLAUDE_CLI === "true") {
|
|
74
74
|
return {
|
|
75
75
|
provider: "claude-cli",
|
|
76
|
-
model: DEFAULT_MODELS["claude-cli"]
|
|
76
|
+
model: process.env.CALIBER_MODEL || DEFAULT_MODELS["claude-cli"]
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
return null;
|
|
@@ -1606,6 +1606,7 @@ init_resolve_caliber();
|
|
|
1606
1606
|
var ERROR_PATTERNS = [
|
|
1607
1607
|
{ pattern: /not logged in|not authenticated|login required|unauthorized/i, message: "Authentication required. Run the login command for your provider to re-authenticate." },
|
|
1608
1608
|
{ pattern: /rate limit|too many requests|429/i, message: "Rate limit exceeded. Retrying..." },
|
|
1609
|
+
{ pattern: /usage limit|out of usage|budget.*limit|limit.*reached/i, message: () => `Usage limit reached. Run \`${resolveCaliber()} config\` to switch models (e.g. auto or composer-1.5).` },
|
|
1609
1610
|
{ pattern: /model.*not found|invalid model|model.*unavailable/i, message: () => `The requested model is not available. Run \`${resolveCaliber()} config\` to select a different model.` }
|
|
1610
1611
|
];
|
|
1611
1612
|
function parseSeatBasedError(stderr, exitCode) {
|
|
@@ -1675,7 +1676,7 @@ var CursorAcpProvider = class {
|
|
|
1675
1676
|
}
|
|
1676
1677
|
buildArgs(model, streaming) {
|
|
1677
1678
|
const args = ["--print", "--trust", "--workspace", os3.tmpdir()];
|
|
1678
|
-
if (model && model !== "
|
|
1679
|
+
if (model && model !== "default") {
|
|
1679
1680
|
args.push("--model", model);
|
|
1680
1681
|
}
|
|
1681
1682
|
if (streaming) {
|
|
@@ -2109,7 +2110,7 @@ var KNOWN_MODELS = {
|
|
|
2109
2110
|
"gpt-4o-mini",
|
|
2110
2111
|
"o3-mini"
|
|
2111
2112
|
],
|
|
2112
|
-
cursor: [],
|
|
2113
|
+
cursor: ["auto", "composer-1.5"],
|
|
2113
2114
|
"claude-cli": []
|
|
2114
2115
|
};
|
|
2115
2116
|
function isModelNotAvailableError(error) {
|
|
@@ -2120,6 +2121,7 @@ function isModelNotAvailableError(error) {
|
|
|
2120
2121
|
if (msg.includes("model") && msg.includes("not available")) return true;
|
|
2121
2122
|
if (msg.includes("model") && msg.includes("does not exist")) return true;
|
|
2122
2123
|
if (msg.includes("publisher model")) return true;
|
|
2124
|
+
if (msg.includes("usage limit") || msg.includes("out of usage")) return true;
|
|
2123
2125
|
return false;
|
|
2124
2126
|
}
|
|
2125
2127
|
function filterRelevantModels(models, provider) {
|
|
@@ -2131,6 +2133,9 @@ function filterRelevantModels(models, provider) {
|
|
|
2131
2133
|
return models.filter(
|
|
2132
2134
|
(m) => m.startsWith("gpt-4") || m.startsWith("gpt-3.5") || m.startsWith("o1") || m.startsWith("o3")
|
|
2133
2135
|
);
|
|
2136
|
+
case "cursor":
|
|
2137
|
+
case "claude-cli":
|
|
2138
|
+
return models;
|
|
2134
2139
|
default:
|
|
2135
2140
|
return models;
|
|
2136
2141
|
}
|
|
@@ -5145,7 +5150,6 @@ async function runInteractiveProviderSetup(options) {
|
|
|
5145
5150
|
break;
|
|
5146
5151
|
}
|
|
5147
5152
|
case "cursor": {
|
|
5148
|
-
config.model = DEFAULT_MODELS.cursor;
|
|
5149
5153
|
if (!isCursorAgentAvailable()) {
|
|
5150
5154
|
console.log(chalk3.yellow("\n Cursor Agent CLI not found."));
|
|
5151
5155
|
console.log(chalk3.dim(" Install it: ") + chalk3.hex("#83D1EB")("curl https://cursor.com/install -fsS | bash"));
|
|
@@ -5158,6 +5162,7 @@ async function runInteractiveProviderSetup(options) {
|
|
|
5158
5162
|
const proceed = await confirm({ message: "Continue anyway?" });
|
|
5159
5163
|
if (!proceed) throw new Error("__exit__");
|
|
5160
5164
|
}
|
|
5165
|
+
config.model = await promptInput(`Model (default: ${DEFAULT_MODELS.cursor}):`) || DEFAULT_MODELS.cursor;
|
|
5161
5166
|
break;
|
|
5162
5167
|
}
|
|
5163
5168
|
case "anthropic": {
|
package/package.json
CHANGED