@corbat-tech/coco 2.4.0 → 2.4.1
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 +38 -9
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -173,7 +173,7 @@ function getBaseUrl(provider) {
|
|
|
173
173
|
case "huggingface":
|
|
174
174
|
return process.env["HF_BASE_URL"] ?? "https://api-inference.huggingface.co/v1";
|
|
175
175
|
case "qwen":
|
|
176
|
-
return process.env["DASHSCOPE_BASE_URL"] ?? "https://dashscope.aliyuncs.com/compatible-mode/v1";
|
|
176
|
+
return process.env["DASHSCOPE_BASE_URL"] ?? "https://dashscope-intl.aliyuncs.com/compatible-mode/v1";
|
|
177
177
|
default:
|
|
178
178
|
return void 0;
|
|
179
179
|
}
|
|
@@ -12044,10 +12044,12 @@ var OpenAIProvider = class {
|
|
|
12044
12044
|
provider: this.id
|
|
12045
12045
|
});
|
|
12046
12046
|
}
|
|
12047
|
+
const defaultHeaders = this.id === "kimi-code" ? { "User-Agent": "claude-code" } : {};
|
|
12047
12048
|
this.client = new OpenAI({
|
|
12048
12049
|
apiKey,
|
|
12049
12050
|
baseURL: config.baseUrl,
|
|
12050
|
-
timeout: config.timeout ?? 12e4
|
|
12051
|
+
timeout: config.timeout ?? 12e4,
|
|
12052
|
+
defaultHeaders
|
|
12051
12053
|
});
|
|
12052
12054
|
}
|
|
12053
12055
|
/**
|
|
@@ -13596,7 +13598,7 @@ async function createProvider(type, config = {}) {
|
|
|
13596
13598
|
break;
|
|
13597
13599
|
case "qwen":
|
|
13598
13600
|
provider = new OpenAIProvider("qwen", "Alibaba Qwen");
|
|
13599
|
-
mergedConfig.baseUrl = mergedConfig.baseUrl ?? "https://dashscope.aliyuncs.com/compatible-mode/v1";
|
|
13601
|
+
mergedConfig.baseUrl = mergedConfig.baseUrl ?? "https://dashscope-intl.aliyuncs.com/compatible-mode/v1";
|
|
13600
13602
|
break;
|
|
13601
13603
|
default:
|
|
13602
13604
|
throw new ProviderError(`Unknown provider type: ${type}`, {
|