@huaweidevtools/aishell-dsh-llm 0.0.5 → 0.0.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/lib/index.js +5 -2
- package/lib/types/adapter.d.ts +4 -1
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -1558,10 +1558,13 @@ var GatewayAdapter = class GatewayAdapter extends LlmAdapter {
|
|
|
1558
1558
|
...securityToken ? { securityToken } : {}
|
|
1559
1559
|
};
|
|
1560
1560
|
}
|
|
1561
|
-
/**
|
|
1561
|
+
/**
|
|
1562
|
+
* Read credentials or throw `MISSING_CREDENTIAL` — every signing code path
|
|
1563
|
+
* goes through here.
|
|
1564
|
+
*/
|
|
1562
1565
|
requireCredentials() {
|
|
1563
1566
|
const creds = this.readCredentials();
|
|
1564
|
-
if (!creds) throw new LlmError("aishell-llm:
|
|
1567
|
+
if (!creds) throw new LlmError("aishell-llm: not authenticated with Huawei Cloud IAM", "MISSING_CREDENTIAL");
|
|
1565
1568
|
return creds;
|
|
1566
1569
|
}
|
|
1567
1570
|
/**
|
package/lib/types/adapter.d.ts
CHANGED
|
@@ -77,7 +77,10 @@ export declare class GatewayAdapter extends LlmAdapter {
|
|
|
77
77
|
hasCredentials(): boolean;
|
|
78
78
|
/** Read AK/SK (and optional SecurityToken) from the credential store. */
|
|
79
79
|
private readCredentials;
|
|
80
|
-
/**
|
|
80
|
+
/**
|
|
81
|
+
* Read credentials or throw `MISSING_CREDENTIAL` — every signing code path
|
|
82
|
+
* goes through here.
|
|
83
|
+
*/
|
|
81
84
|
private requireCredentials;
|
|
82
85
|
/**
|
|
83
86
|
* Sign a request with AK/SK and fetch. Encapsulates the SDK-HMAC-SHA256
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@huaweidevtools/aishell-dsh-llm",
|
|
3
3
|
"description": "aishell LLM gateway adapter for DSH — OpenAI-compatible, Huawei Cloud AK/SK auth via credential store",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.6",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"license": "Apache-2.0",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"eventsource-parser": "^3.0.0",
|
|
36
|
-
"@huaweidevtools/aishell-dsh-credentials-store": "0.0.
|
|
36
|
+
"@huaweidevtools/aishell-dsh-credentials-store": "0.0.6"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@deepseek-ai/cordis": "^4.0.4",
|