@aigne/openai 0.9.0 → 0.9.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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.9.1](https://github.com/AIGNE-io/aigne-framework/compare/openai-v0.9.0...openai-v0.9.1) (2025-07-14)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **cli:** print pretty error message for cli ([#249](https://github.com/AIGNE-io/aigne-framework/issues/249)) ([d68e0f7](https://github.com/AIGNE-io/aigne-framework/commit/d68e0f7151259a05696de77d9f00793b6f5b36b2))
9
+ * **deps:** update deps to latest version ([#247](https://github.com/AIGNE-io/aigne-framework/issues/247)) ([3972f88](https://github.com/AIGNE-io/aigne-framework/commit/3972f887a9abff20c26da6b51c1071cbd54c0bf1))
10
+
11
+
12
+ ### Dependencies
13
+
14
+ * The following workspace dependencies were updated
15
+ * dependencies
16
+ * @aigne/core bumped to 1.33.1
17
+ * devDependencies
18
+ * @aigne/test-utils bumped to 0.5.6
19
+
3
20
  ## [0.9.0](https://github.com/AIGNE-io/aigne-framework/compare/openai-v0.8.2...openai-v0.9.0) (2025-07-10)
4
21
 
5
22
 
@@ -85,7 +85,7 @@ class OpenAIChatModel extends core_1.ChatModel {
85
85
  get client() {
86
86
  const apiKey = this.options?.apiKey || process.env[this.apiKeyEnvName] || this.apiKeyDefault;
87
87
  if (!apiKey)
88
- throw new Error(`Api Key is required for ${this.name}`);
88
+ throw new Error(`${this.name} requires an API key. Please provide it via \`options.apiKey\`, or set the \`${this.apiKeyEnvName}\` environment variable`);
89
89
  this._client ??= new CustomOpenAI({
90
90
  baseURL: this.options?.baseURL,
91
91
  apiKey,
@@ -76,7 +76,7 @@ export class OpenAIChatModel extends ChatModel {
76
76
  get client() {
77
77
  const apiKey = this.options?.apiKey || process.env[this.apiKeyEnvName] || this.apiKeyDefault;
78
78
  if (!apiKey)
79
- throw new Error(`Api Key is required for ${this.name}`);
79
+ throw new Error(`${this.name} requires an API key. Please provide it via \`options.apiKey\`, or set the \`${this.apiKeyEnvName}\` environment variable`);
80
80
  this._client ??= new CustomOpenAI({
81
81
  baseURL: this.options?.baseURL,
82
82
  apiKey,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/openai",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "AIGNE OpenAI SDK for integrating with OpenAI's GPT models and API services",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -35,17 +35,17 @@
35
35
  "ajv": "^8.17.1",
36
36
  "jaison": "^2.0.2",
37
37
  "nanoid": "^5.1.5",
38
- "openai": "^5.8.2",
38
+ "openai": "^5.8.3",
39
39
  "zod": "^3.25.67",
40
- "@aigne/core": "^1.33.0"
40
+ "@aigne/core": "^1.33.1"
41
41
  },
42
42
  "devDependencies": {
43
- "@types/bun": "^1.2.17",
44
- "@types/node": "^24.0.10",
43
+ "@types/bun": "^1.2.18",
44
+ "@types/node": "^24.0.12",
45
45
  "npm-run-all": "^4.1.5",
46
46
  "rimraf": "^6.0.1",
47
47
  "typescript": "^5.8.3",
48
- "@aigne/test-utils": "^0.5.5"
48
+ "@aigne/test-utils": "^0.5.6"
49
49
  },
50
50
  "scripts": {
51
51
  "lint": "tsc --noEmit",