pi-free 2.0.14 → 2.1.0
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/CHANGELOG.md +90 -0
- package/README.md +64 -78
- package/banner.svg +21 -36
- package/config.ts +123 -9
- package/constants.ts +3 -9
- package/index.ts +14 -15
- package/lib/built-in-toggle.ts +29 -16
- package/lib/json-persistence.ts +90 -22
- package/lib/logger.ts +21 -12
- package/lib/model-detection.ts +2 -12
- package/lib/model-enhancer.ts +11 -2
- package/lib/model-metadata.ts +387 -0
- package/lib/open-browser.ts +74 -24
- package/lib/paths.ts +90 -0
- package/lib/probe-cache.ts +19 -19
- package/lib/provider-cache.ts +74 -28
- package/lib/provider-compat.ts +58 -9
- package/lib/provider-probe.ts +188 -0
- package/lib/registry.ts +1 -5
- package/lib/session-start-metrics.ts +46 -0
- package/lib/telemetry.ts +115 -86
- package/lib/types.ts +22 -2
- package/lib/util.ts +80 -21
- package/package.json +7 -2
- package/provider-failover/benchmark-lookup.ts +17 -5
- package/provider-helper.ts +11 -2
- package/providers/cline/cline-models.ts +12 -2
- package/providers/cline/cline-xml-bridge.ts +974 -0
- package/providers/cline/cline.ts +67 -176
- package/providers/crofai/crofai.ts +6 -1
- package/providers/deepinfra/deepinfra.ts +69 -2
- package/providers/dynamic-built-in/index.ts +237 -2
- package/providers/kilo/kilo-models.ts +3 -1
- package/providers/kilo/kilo.ts +268 -41
- package/providers/model-fetcher.ts +18 -55
- package/providers/novita/novita.ts +69 -2
- package/providers/ollama/ollama.ts +48 -24
- package/providers/opencode-session.ts +67 -2
- package/providers/routeway/routeway.ts +188 -2
- package/providers/sambanova/sambanova.ts +67 -1
- package/providers/together/together.ts +69 -2
- package/providers/tokenrouter/tokenrouter.ts +378 -0
- package/providers/zenmux/zenmux.ts +6 -1
- package/scripts/check-extensions.mjs +32 -16
- package/providers/nvidia/nvidia.ts +0 -504
|
@@ -14,6 +14,8 @@ import {
|
|
|
14
14
|
PROVIDER_CLINE,
|
|
15
15
|
} from "../../constants.ts";
|
|
16
16
|
import type { ProviderModelConfig } from "../../lib/types.ts";
|
|
17
|
+
import { safeEnrichModelsWithModelsDev } from "../../lib/model-metadata.ts";
|
|
18
|
+
import { getProxyModelCompat } from "../../lib/provider-compat.ts";
|
|
17
19
|
import { cleanModelName, fetchWithRetry } from "../../lib/util.ts";
|
|
18
20
|
|
|
19
21
|
interface ClineRaw {
|
|
@@ -164,8 +166,11 @@ function modelFromCatalog(
|
|
|
164
166
|
contextWindow:
|
|
165
167
|
info.context_length ?? info.top_provider?.context_length ?? 128_000,
|
|
166
168
|
maxTokens: info.top_provider?.max_completion_tokens ?? 8_192,
|
|
169
|
+
...(getProxyModelCompat({ id: info.id, name: info.name })
|
|
170
|
+
? { compat: getProxyModelCompat({ id: info.id, name: info.name }) }
|
|
171
|
+
: {}),
|
|
167
172
|
_pricingKnown: info.pricing !== null && info.pricing !== undefined,
|
|
168
|
-
};
|
|
173
|
+
} as ProviderModelConfig & { _pricingKnown?: boolean; compat?: any };
|
|
169
174
|
}
|
|
170
175
|
|
|
171
176
|
async function fetchClineRecommendedFreeModels(): Promise<
|
|
@@ -239,7 +244,12 @@ export async function fetchClineModels(
|
|
|
239
244
|
? models.filter((m) => m.cost.input === 0 && m.cost.output === 0)
|
|
240
245
|
: models;
|
|
241
246
|
|
|
242
|
-
return applyHidden(
|
|
247
|
+
return applyHidden(
|
|
248
|
+
await safeEnrichModelsWithModelsDev(filtered, {
|
|
249
|
+
providerId: PROVIDER_CLINE,
|
|
250
|
+
}),
|
|
251
|
+
PROVIDER_CLINE,
|
|
252
|
+
);
|
|
243
253
|
}
|
|
244
254
|
|
|
245
255
|
/**
|