clawmoney 0.13.12 → 0.13.13
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/relay/pricing.js +5 -1
- package/dist/relay/provider.js +26 -0
- package/dist/relay/types.d.ts +10 -0
- package/package.json +1 -1
package/dist/relay/pricing.js
CHANGED
|
@@ -57,8 +57,12 @@ export const API_PRICES = {
|
|
|
57
57
|
"antigravity-gemini-3-pro": { input: 2, output: 12 },
|
|
58
58
|
"antigravity-gemini-3.1-pro": { input: 2, output: 12 },
|
|
59
59
|
"antigravity-gemini-3-flash": { input: 0.50, output: 3 },
|
|
60
|
-
"antigravity-
|
|
60
|
+
"antigravity-gemini-2.5-pro": { input: 1.25, output: 10 },
|
|
61
|
+
"antigravity-gemini-2.5-flash": { input: 0.30, output: 2.50 },
|
|
62
|
+
"antigravity-claude-opus-4-6": { input: 5, output: 25 },
|
|
61
63
|
"antigravity-claude-opus-4-6-thinking": { input: 5, output: 25 },
|
|
64
|
+
"antigravity-claude-sonnet-4-6": { input: 3, output: 15 },
|
|
65
|
+
"antigravity-claude-sonnet-4-5": { input: 3, output: 15 },
|
|
62
66
|
// ── Google (Gemini) ──
|
|
63
67
|
// Verified against LiteLLM pricing DB.
|
|
64
68
|
"gemini-3.1-pro-preview": { input: 2, output: 12 },
|
package/dist/relay/provider.js
CHANGED
|
@@ -97,8 +97,30 @@ function loadRelayConfig(cliOverride) {
|
|
|
97
97
|
agent_id: raw.agent_id,
|
|
98
98
|
agent_slug: raw.agent_slug,
|
|
99
99
|
relay,
|
|
100
|
+
proxy: typeof raw.proxy === "string" ? raw.proxy : undefined,
|
|
100
101
|
};
|
|
101
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* Export the config's `proxy` setting into process.env so every downstream
|
|
105
|
+
* module (claude-api, codex-api, gemini-api, antigravity-api) that already
|
|
106
|
+
* reads HTTPS_PROXY at startup picks it up without any per-module changes.
|
|
107
|
+
* Silently no-ops if the env var is already set by the user's shell.
|
|
108
|
+
*/
|
|
109
|
+
function applyProxyFromConfig(config) {
|
|
110
|
+
if (!config.proxy)
|
|
111
|
+
return;
|
|
112
|
+
const alreadySet = process.env.HTTPS_PROXY ||
|
|
113
|
+
process.env.https_proxy ||
|
|
114
|
+
process.env.HTTP_PROXY ||
|
|
115
|
+
process.env.http_proxy;
|
|
116
|
+
if (alreadySet) {
|
|
117
|
+
logger.info(`[provider] shell HTTPS_PROXY=${alreadySet} overrides config.yaml proxy=${config.proxy}`);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
process.env.HTTPS_PROXY = config.proxy;
|
|
121
|
+
process.env.HTTP_PROXY = config.proxy;
|
|
122
|
+
logger.info(`[provider] using config.yaml proxy=${config.proxy}`);
|
|
123
|
+
}
|
|
102
124
|
// ── Request handler ──
|
|
103
125
|
function messagesToPrompt(messages) {
|
|
104
126
|
return messages.map((m) => String(m.content ?? "")).join("\n");
|
|
@@ -239,6 +261,10 @@ export function runRelayProvider(cliOverride) {
|
|
|
239
261
|
process.exit(1);
|
|
240
262
|
}
|
|
241
263
|
const config = loadRelayConfig(cliOverride);
|
|
264
|
+
// Make the config-level proxy visible to every upstream module that reads
|
|
265
|
+
// process.env.HTTPS_PROXY / http_proxy at init time. Must run BEFORE any
|
|
266
|
+
// preflight call so the first outbound request already goes through it.
|
|
267
|
+
applyProxyFromConfig(config);
|
|
242
268
|
// Prepare relay sandbox assets once at startup.
|
|
243
269
|
ensureEmptyMcpConfig();
|
|
244
270
|
ensureSandboxDir();
|
package/dist/relay/types.d.ts
CHANGED
|
@@ -87,4 +87,14 @@ export interface RelayProviderConfig {
|
|
|
87
87
|
agent_id?: string;
|
|
88
88
|
agent_slug?: string;
|
|
89
89
|
relay: RelayProviderSettings;
|
|
90
|
+
/**
|
|
91
|
+
* Upstream HTTPS proxy. When set, the daemon exports HTTPS_PROXY /
|
|
92
|
+
* HTTP_PROXY before running any fetch, so providers on GFW-side machines
|
|
93
|
+
* don't have to remember to `export https_proxy=` in every shell. Only
|
|
94
|
+
* plain HTTP(S) proxies are supported (SOCKS is ignored with a warning).
|
|
95
|
+
*
|
|
96
|
+
* Example:
|
|
97
|
+
* proxy: http://127.0.0.1:7897
|
|
98
|
+
*/
|
|
99
|
+
proxy?: string;
|
|
90
100
|
}
|