@huaweidevtools/aishell-dsh-llm 0.0.5 → 0.0.7

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/README.md CHANGED
@@ -70,7 +70,7 @@ dsh plugin --profile <name> add @huaweidevtools/aishell-dsh-base
70
70
 
71
71
  | Field | Type | Default | Description |
72
72
  |---|---|---|---|
73
- | `baseUrl` | `string?` | `https://api.aishell.openbuildlab.com/v1` | Chat API base URL. `/chat/completions` and `/models` are appended, so a base carrying its own path segment is signed and requested in full. |
73
+ | `baseUrl` | `string?` | `https://openai.aishell.openbuildlab.com/v1` | Chat API base URL. `/chat/completions` and `/models` are appended, so a base carrying its own path segment is signed and requested in full. |
74
74
  | `keyringService` | `string?` | `aishell-dsh` | Credential store service name. |
75
75
  | `requestImagePixelBudget` | `number?` | `4194304` | Total-pixel cap one request image is scaled into. |
76
76
  | `requestImageMaxBytes` | `number?` | `1048576` | Encoded-byte target for one request image. |
package/lib/index.js CHANGED
@@ -1558,10 +1558,13 @@ var GatewayAdapter = class GatewayAdapter extends LlmAdapter {
1558
1558
  ...securityToken ? { securityToken } : {}
1559
1559
  };
1560
1560
  }
1561
- /** Read credentials or throw MISSING_CREDENTIAL — every signing code path goes through here. */
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: HW_ACCESS_KEY and HW_SECRET_KEY not found in credential store (service \"aishell-dsh\"); store them first", "MISSING_CREDENTIAL");
1567
+ if (!creds) throw new LlmError("aishell-llm: not authenticated with Huawei Cloud IAM", "MISSING_CREDENTIAL");
1565
1568
  return creds;
1566
1569
  }
1567
1570
  /**
@@ -1655,7 +1658,7 @@ GatewayAdapter.MODELS_TTL_MS = 6e4;
1655
1658
  //#endregion
1656
1659
  //#region src/index.ts
1657
1660
  /** Default chat API base URL. Both `/chat/completions` and `/models` hang below `/v1`. */
1658
- const DEFAULT_BASE_URL = "https://api.aishell.openbuildlab.com/v1";
1661
+ const DEFAULT_BASE_URL = "https://openai.aishell.openbuildlab.com/v1";
1659
1662
  /**
1660
1663
  * Default total-pixel cap one request image is scaled into, and the encoded
1661
1664
  * byte target the encoder aims for. Both match the pi-ai defaults, for the
@@ -16,7 +16,7 @@ import { type ImageRequestBudget } from './images.ts';
16
16
  /** Adapter construction options. */
17
17
  export interface GatewayAdapterOptions {
18
18
  /**
19
- * Resolve the current chat API base URL (e.g. `https://api.aishell.openbuildlab.com/v1`).
19
+ * Resolve the current chat API base URL (e.g. `https://openai.aishell.openbuildlab.com/v1`).
20
20
  *
21
21
  * A reader, not a value, for the same reason `resolveAttachments` is: this
22
22
  * plugin's whole Config is `Volatile`, so a settings edit is a
@@ -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
- /** Read credentials or throw MISSING_CREDENTIAL — every signing code path goes through here. */
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.5",
4
+ "version": "0.0.7",
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.5"
36
+ "@huaweidevtools/aishell-dsh-credentials-store": "0.0.7"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@deepseek-ai/cordis": "^4.0.4",