@oh-my-pi/pi-ai 13.9.3 → 13.9.5

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,18 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [13.9.4] - 2026-03-07
6
+ ### Changed
7
+
8
+ - Simplified API key credential storage to always replace existing credentials on re-login instead of accumulating multiple keys
9
+ - Updated Kagi API key placeholder from `kagi_...` to `KG_...` to match current API key format
10
+ - Updated Kagi login instructions to clarify Search API access is beta-only and provide support contact
11
+ - Disabled usage reporting in streaming responses for Cerebras models due to compatibility issues
12
+
13
+ ### Fixed
14
+
15
+ - Fixed Cerebras model compatibility by preventing `stream_options` usage requests in chat completions
16
+
5
17
  ## [13.9.3] - 2026-03-07
6
18
  ### Breaking Changes
7
19
 
@@ -77,6 +89,8 @@
77
89
  - Fixed OpenAI Codex streaming to properly include service_tier in SSE payloads
78
90
  - Fixed type safety in OpenAI responses by removing unsafe type casts on image content blocks
79
91
  - Fixed credential purging to respect disabled credentials when deduplicating by email
92
+ - Fixed API-key provider re-login to replace the active stored key instead of appending stale credentials that were still selected first
93
+ - Fixed Kagi login guidance to use the correct `KG_...` key format and mention Search API beta access requirements
80
94
 
81
95
  ## [13.9.2] - 2026-03-05
82
96
 
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.9.3",
4
+ "version": "13.9.5",
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",
@@ -41,7 +41,7 @@
41
41
  "@aws-sdk/client-bedrock-runtime": "^3",
42
42
  "@bufbuild/protobuf": "^2.11",
43
43
  "@google/genai": "^1.43",
44
- "@oh-my-pi/pi-utils": "13.9.3",
44
+ "@oh-my-pi/pi-utils": "13.9.5",
45
45
  "@sinclair/typebox": "^0.34",
46
46
  "@smithy/node-http-handler": "^4.4",
47
47
  "ajv": "^8.18",
@@ -773,17 +773,7 @@ export class AuthStorage {
773
773
  let credentials: OAuthCredentials;
774
774
  const saveApiKeyCredential = async (apiKey: string): Promise<void> => {
775
775
  const newCredential: ApiKeyCredential = { type: "api_key", key: apiKey };
776
- const shouldReplaceExisting = provider === "minimax-code" || provider === "minimax-code-cn";
777
- if (shouldReplaceExisting) {
778
- await this.set(provider, newCredential);
779
- return;
780
- }
781
- const existing = this.#getCredentialsForProvider(provider);
782
- if (existing.length === 0) {
783
- await this.set(provider, newCredential);
784
- return;
785
- }
786
- await this.set(provider, [...existing, newCredential]);
776
+ await this.set(provider, newCredential);
787
777
  };
788
778
  const manualCodeInput = () => ctrl.onPrompt({ message: "Paste the authorization code (or full redirect URL):" });
789
779
  switch (provider) {
@@ -111,8 +111,8 @@ export async function resolveProviderModels<TApi extends Api = Api, TModelsDevPa
111
111
  const dynamicFetchSucceeded = fetchedDynamicModels !== null;
112
112
  const cacheModels = dynamicFetchSucceeded ? [] : normalizeModelList<TApi>(cache?.models ?? []);
113
113
  const dynamicModels = fetchedDynamicModels ?? [];
114
- const mergedWithoutDynamic = mergeModelSources(staticModels, modelsDevModels, cacheModels);
115
- const models = mergeDynamicModels(mergedWithoutDynamic, dynamicModels);
114
+ const mergedWithCache = mergeDynamicModels(mergeModelSources(staticModels, modelsDevModels), cacheModels);
115
+ const models = mergeDynamicModels(mergedWithCache, dynamicModels);
116
116
  const dynamicAuthoritative = !hasDynamicFetcher || dynamicFetchSucceeded || shouldUseFreshCacheAsAuthoritative;
117
117
  if (shouldFetchFromNetwork) {
118
118
  if (dynamicFetchSucceeded) {
@@ -125,7 +125,10 @@ export async function resolveProviderModels<TApi extends Api = Api, TModelsDevPa
125
125
  writeModelCache(
126
126
  options.providerId,
127
127
  now(),
128
- mergeModelSources(staticModels, modelsDevModels, latestCache?.models ?? cache?.models ?? []),
128
+ mergeDynamicModels(
129
+ mergeModelSources(staticModels, modelsDevModels),
130
+ normalizeModelList<TApi>(latestCache?.models ?? cache?.models ?? []),
131
+ ),
129
132
  false,
130
133
  dbPath,
131
134
  );