@oh-my-pi/pi-ai 13.3.5 → 13.3.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/CHANGELOG.md CHANGED
@@ -2,6 +2,23 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [13.3.7] - 2026-02-27
6
+ ### Added
7
+
8
+ - Added `tryEnforceStrictSchema` function that gracefully downgrades to non-strict mode when schema enforcement fails, enabling better compatibility with malformed or circular schemas
9
+ - Added `sanitizeSchemaForStrictMode` function to normalize JSON schemas by stripping non-structural keywords, converting `const` to `enum`, and expanding type arrays into `anyOf` variants
10
+ - Added Kilo Gateway provider support with OpenAI-compatible model discovery, OAuth `/login kilo`, and `KILO_API_KEY` environment variable support ([#193](https://github.com/can1357/oh-my-pi/issues/193))
11
+
12
+ ### Changed
13
+
14
+ - Changed strict mode handling in OpenAI providers to use `tryEnforceStrictSchema` for safer schema enforcement with automatic fallback to non-strict mode
15
+ - Enhanced `enforceStrictSchema` to properly handle schemas with type arrays containing `object` (e.g., `type: ["object", "null"]`)
16
+
17
+ ### Fixed
18
+
19
+ - Fixed `enforceStrictSchema` to properly handle malformed object schemas with required keys but missing properties
20
+ - Fixed `enforceStrictSchema` to correctly process nested object schemas within `anyOf`, `allOf`, and `oneOf` combinators
21
+
5
22
  ## [13.3.1] - 2026-02-26
6
23
  ### Added
7
24
 
package/README.md CHANGED
@@ -63,6 +63,7 @@ Unified LLM API with automatic model discovery, provider configuration, token an
63
63
  - **xAI**
64
64
  - **Venice** (requires `VENICE_API_KEY`)
65
65
  - **OpenRouter**
66
+ - **Kilo Gateway** (supports OAuth `/login kilo` or `KILO_API_KEY`)
66
67
  - **LiteLLM** (requires `LITELLM_API_KEY`)
67
68
  - **zAI** (requires `ZAI_API_KEY`)
68
69
  - **MiniMax Coding Plan** (requires `MINIMAX_CODE_API_KEY` or `MINIMAX_CODE_CN_API_KEY`)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-ai",
4
- "version": "13.3.5",
4
+ "version": "13.3.7",
5
5
  "description": "Unified LLM API with automatic model discovery and provider configuration",
6
6
  "homepage": "https://github.com/can1357/oh-my-pi",
7
7
  "author": "Can Boluk",
@@ -44,7 +44,7 @@
44
44
  "@connectrpc/connect-node": "^2.1",
45
45
  "@google/genai": "^1.43",
46
46
  "@mistralai/mistralai": "^1.14",
47
- "@oh-my-pi/pi-utils": "13.3.5",
47
+ "@oh-my-pi/pi-utils": "13.3.7",
48
48
  "@sinclair/typebox": "^0.34",
49
49
  "@smithy/node-http-handler": "^4.4",
50
50
  "ajv": "^8.18",
@@ -41,6 +41,7 @@ import { loginGitLabDuo } from "./utils/oauth/gitlab-duo";
41
41
  import { loginAntigravity } from "./utils/oauth/google-antigravity";
42
42
  import { loginGeminiCli } from "./utils/oauth/google-gemini-cli";
43
43
  import { loginHuggingface } from "./utils/oauth/huggingface";
44
+ import { loginKilo } from "./utils/oauth/kilo";
44
45
  import { loginKimi } from "./utils/oauth/kimi";
45
46
  import { loginLiteLLM } from "./utils/oauth/litellm";
46
47
  import { loginMiniMaxCode, loginMiniMaxCodeCn } from "./utils/oauth/minimax-code";
@@ -773,6 +774,9 @@ export class AuthStorage {
773
774
  case "kimi-code":
774
775
  credentials = await loginKimi(ctrl);
775
776
  break;
777
+ case "kilo":
778
+ credentials = await loginKilo(ctrl);
779
+ break;
776
780
  case "cursor":
777
781
  credentials = await loginCursor(
778
782
  url => ctrl.onAuth({ url }),
package/src/cli.ts CHANGED
@@ -7,6 +7,7 @@ import { loginCursor } from "./utils/oauth/cursor";
7
7
  import { loginGitHubCopilot } from "./utils/oauth/github-copilot";
8
8
  import { loginAntigravity } from "./utils/oauth/google-antigravity";
9
9
  import { loginGeminiCli } from "./utils/oauth/google-gemini-cli";
10
+ import { loginKilo } from "./utils/oauth/kilo";
10
11
  import { loginKimi } from "./utils/oauth/kimi";
11
12
  import { loginMiniMaxCode, loginMiniMaxCodeCn } from "./utils/oauth/minimax-code";
12
13
  import { loginNanoGPT } from "./utils/oauth/nanogpt";
@@ -146,6 +147,16 @@ async function login(provider: OAuthProvider): Promise<void> {
146
147
  },
147
148
  });
148
149
  break;
150
+ case "kilo":
151
+ credentials = await loginKilo({
152
+ onAuth(info) {
153
+ const { url, instructions } = info;
154
+ console.log(`\nOpen this URL in your browser:\n${url}`);
155
+ if (instructions) console.log(instructions);
156
+ console.log();
157
+ },
158
+ });
159
+ break;
149
160
 
150
161
  case "cursor":
151
162
  credentials = await loginCursor(
@@ -259,6 +270,7 @@ Providers:
259
270
  google-antigravity Antigravity (Gemini 3, Claude, GPT-OSS)
260
271
  openai-codex OpenAI Codex (ChatGPT Plus/Pro)
261
272
  kimi-code Kimi Code
273
+ kilo Kilo Gateway
262
274
  zai Z.AI (GLM Coding Plan)
263
275
  nanogpt NanoGPT
264
276
  minimax-code MiniMax Coding Plan (International)