@cleocode/cleo 2026.6.4 → 2026.6.6
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/cli/index.js +10 -22
- package/dist/cli/index.js.map +1 -1
- package/package.json +12 -12
package/dist/cli/index.js
CHANGED
|
@@ -55800,13 +55800,7 @@ __export(llm_stream_exports, {
|
|
|
55800
55800
|
streamCommand: () => streamCommand
|
|
55801
55801
|
});
|
|
55802
55802
|
async function buildSession(provider, model) {
|
|
55803
|
-
const [
|
|
55804
|
-
{ resolveCredentials: resolveCredentials2 },
|
|
55805
|
-
{ ConcreteSession },
|
|
55806
|
-
{ AnthropicTransport },
|
|
55807
|
-
{ ChatCompletionsTransport },
|
|
55808
|
-
{ GeminiTransport }
|
|
55809
|
-
] = await Promise.all([
|
|
55803
|
+
const [{ resolveCredentials: resolveCredentials2 }, { ConcreteSession }, { ModelRunner }, { deriveApiWire }] = await Promise.all([
|
|
55810
55804
|
import(
|
|
55811
55805
|
/* webpackIgnore: true */
|
|
55812
55806
|
"@cleocode/core/llm/credentials.js"
|
|
@@ -55817,15 +55811,11 @@ async function buildSession(provider, model) {
|
|
|
55817
55811
|
),
|
|
55818
55812
|
import(
|
|
55819
55813
|
/* webpackIgnore: true */
|
|
55820
|
-
"@cleocode/core/llm/
|
|
55814
|
+
"@cleocode/core/llm/model-runner.js"
|
|
55821
55815
|
),
|
|
55822
55816
|
import(
|
|
55823
55817
|
/* webpackIgnore: true */
|
|
55824
|
-
"@cleocode/core/llm/
|
|
55825
|
-
),
|
|
55826
|
-
import(
|
|
55827
|
-
/* webpackIgnore: true */
|
|
55828
|
-
"@cleocode/core/llm/transports/gemini.js"
|
|
55818
|
+
"@cleocode/core/llm/api-mode.js"
|
|
55829
55819
|
)
|
|
55830
55820
|
]);
|
|
55831
55821
|
const cred = resolveCredentials2(provider);
|
|
@@ -55834,14 +55824,7 @@ async function buildSession(provider, model) {
|
|
|
55834
55824
|
`No credential found for provider '${provider}'. Set the appropriate environment variable or run 'cleo llm add ${provider}'.`
|
|
55835
55825
|
);
|
|
55836
55826
|
}
|
|
55837
|
-
|
|
55838
|
-
if (provider === "anthropic") {
|
|
55839
|
-
transport = cred.authType === "oauth" ? new AnthropicTransport({ authToken: cred.apiKey }) : new AnthropicTransport({ apiKey: cred.apiKey });
|
|
55840
|
-
} else if (provider === "gemini") {
|
|
55841
|
-
transport = new GeminiTransport({ apiKey: cred.apiKey });
|
|
55842
|
-
} else {
|
|
55843
|
-
transport = new ChatCompletionsTransport({ provider, apiKey: cred.apiKey });
|
|
55844
|
-
}
|
|
55827
|
+
const wire = deriveApiWire(provider, cred.authType);
|
|
55845
55828
|
const resolvedCredential = {
|
|
55846
55829
|
provider,
|
|
55847
55830
|
label: "default",
|
|
@@ -55850,9 +55833,14 @@ async function buildSession(provider, model) {
|
|
|
55850
55833
|
expiresAt: null,
|
|
55851
55834
|
refreshToken: null,
|
|
55852
55835
|
extraHeaders: {},
|
|
55853
|
-
baseUrl:
|
|
55836
|
+
baseUrl: wire.baseUrl,
|
|
55854
55837
|
awsProfile: null
|
|
55855
55838
|
};
|
|
55839
|
+
const transport = ModelRunner.buildTransportFromCredential(
|
|
55840
|
+
provider,
|
|
55841
|
+
resolvedCredential,
|
|
55842
|
+
wire.apiMode
|
|
55843
|
+
);
|
|
55856
55844
|
return new ConcreteSession({ transport, model, credential: resolvedCredential });
|
|
55857
55845
|
}
|
|
55858
55846
|
async function getComputeCost() {
|