@oh-my-pi/pi-ai 16.3.3 → 16.3.4
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,20 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [16.3.4] - 2026-07-03
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added support for Baseten as an AI provider
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Improved Claude usage reliability by removing proactive hard-blocking for Fable and Mythos tiers
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- Fixed Anthropic OAuth account rotation to exclude unreliable model-scoped Fable/Mythos weekly caps from proactive hard-blocking, ensuring they act only as ranking priority hints while still allowing reactive 429-fallback to rotate and reach serviceable siblings.
|
|
18
|
+
|
|
5
19
|
## [16.3.3] - 2026-07-02
|
|
6
20
|
|
|
7
21
|
### Added
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { OAuthLoginCallbacks } from "./oauth/types";
|
|
2
|
+
export declare const loginBaseten: (options: import("./oauth").OAuthController) => Promise<string>;
|
|
3
|
+
export declare const basetenProvider: {
|
|
4
|
+
readonly id: "baseten";
|
|
5
|
+
readonly name: "Baseten";
|
|
6
|
+
readonly login: (cb: OAuthLoginCallbacks) => Promise<string>;
|
|
7
|
+
};
|
|
@@ -29,6 +29,10 @@ declare const ALL: ({
|
|
|
29
29
|
} | {
|
|
30
30
|
readonly id: "azure";
|
|
31
31
|
readonly name: "Azure OpenAI";
|
|
32
|
+
} | {
|
|
33
|
+
readonly id: "baseten";
|
|
34
|
+
readonly name: "Baseten";
|
|
35
|
+
readonly login: (cb: import("./oauth").OAuthLoginCallbacks) => Promise<string>;
|
|
32
36
|
} | {
|
|
33
37
|
readonly id: "cerebras";
|
|
34
38
|
readonly name: "Cerebras";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-ai",
|
|
4
|
-
"version": "16.3.
|
|
4
|
+
"version": "16.3.4",
|
|
5
5
|
"description": "Unified LLM API with automatic model discovery and provider configuration",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@bufbuild/protobuf": "^2.12.0",
|
|
41
|
-
"@oh-my-pi/pi-catalog": "16.3.
|
|
42
|
-
"@oh-my-pi/pi-utils": "16.3.
|
|
43
|
-
"@oh-my-pi/pi-wire": "16.3.
|
|
41
|
+
"@oh-my-pi/pi-catalog": "16.3.4",
|
|
42
|
+
"@oh-my-pi/pi-utils": "16.3.4",
|
|
43
|
+
"@oh-my-pi/pi-wire": "16.3.4",
|
|
44
44
|
"arktype": "^2.2.0",
|
|
45
45
|
"zod": "^4"
|
|
46
46
|
},
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createApiKeyLogin } from "./api-key-login";
|
|
2
|
+
import type { OAuthLoginCallbacks } from "./oauth/types";
|
|
3
|
+
import type { ProviderDefinition } from "./types";
|
|
4
|
+
|
|
5
|
+
export const loginBaseten = createApiKeyLogin({
|
|
6
|
+
providerLabel: "Baseten",
|
|
7
|
+
authUrl: "https://app.baseten.co/settings/api_keys",
|
|
8
|
+
instructions: "Copy your API key from the Baseten dashboard",
|
|
9
|
+
promptMessage: "Paste your Baseten API key",
|
|
10
|
+
placeholder: "bt_...",
|
|
11
|
+
validation: {
|
|
12
|
+
kind: "models-endpoint",
|
|
13
|
+
provider: "Baseten",
|
|
14
|
+
modelsUrl: "https://inference.baseten.co/v1/models",
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export const basetenProvider = {
|
|
19
|
+
id: "baseten",
|
|
20
|
+
name: "Baseten",
|
|
21
|
+
login: (cb: OAuthLoginCallbacks) => loginBaseten(cb),
|
|
22
|
+
} as const satisfies ProviderDefinition;
|
package/src/registry/registry.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { alibabaCodingPlanProvider } from "./alibaba-coding-plan";
|
|
|
4
4
|
import { amazonBedrockProvider } from "./amazon-bedrock";
|
|
5
5
|
import { anthropicProvider } from "./anthropic";
|
|
6
6
|
import { azureProvider } from "./azure";
|
|
7
|
+
import { basetenProvider } from "./baseten";
|
|
7
8
|
import { cerebrasProvider } from "./cerebras";
|
|
8
9
|
import { cloudflareAiGatewayProvider } from "./cloudflare-ai-gateway";
|
|
9
10
|
import { coreWeaveProvider } from "./coreweave";
|
|
@@ -105,6 +106,7 @@ const ALL = [
|
|
|
105
106
|
deepseekProvider,
|
|
106
107
|
moonshotProvider,
|
|
107
108
|
cerebrasProvider,
|
|
109
|
+
basetenProvider,
|
|
108
110
|
fireworksProvider,
|
|
109
111
|
togetherProvider,
|
|
110
112
|
nvidiaProvider,
|
package/src/usage/claude.ts
CHANGED
|
@@ -614,6 +614,23 @@ function scopeClaudeLimitsForModel(report: UsageReport, context: CredentialRanki
|
|
|
614
614
|
);
|
|
615
615
|
}
|
|
616
616
|
|
|
617
|
+
/**
|
|
618
|
+
* Exclude Fable and Mythos tier weekly caps from proactive hard-blocking
|
|
619
|
+
* (gating) because they are notoriously unreliable (they report 100% exhausted
|
|
620
|
+
* while the account can still serve requests). They stay available for ranking
|
|
621
|
+
* pressure in findWindowLimits via scopeClaudeLimitsForModel.
|
|
622
|
+
*/
|
|
623
|
+
function scopeClaudeLimitsForModelHardBlock(
|
|
624
|
+
report: UsageReport,
|
|
625
|
+
context: CredentialRankingContext | undefined,
|
|
626
|
+
): UsageLimit[] {
|
|
627
|
+
const kind = getClaudeModelKind(context);
|
|
628
|
+
const excludeHardBlock = kind === "fable" || kind === "mythos";
|
|
629
|
+
return report.limits.filter(
|
|
630
|
+
limit => limit.scope.shared === true || (kind !== undefined && limit.scope.tier === kind && !excludeHardBlock),
|
|
631
|
+
);
|
|
632
|
+
}
|
|
633
|
+
|
|
617
634
|
function rankingUsedFraction(limit: UsageLimit): number {
|
|
618
635
|
const fraction = resolveUsedFraction(limit);
|
|
619
636
|
if (typeof fraction !== "number" || !Number.isFinite(fraction)) return 0.5;
|
|
@@ -664,7 +681,7 @@ export const claudeRankingStrategy: CredentialRankingStrategy = {
|
|
|
664
681
|
const secondary = findClaudeSecondaryLimit(report, context);
|
|
665
682
|
return { primary, secondary };
|
|
666
683
|
},
|
|
667
|
-
scopeLimits:
|
|
684
|
+
scopeLimits: scopeClaudeLimitsForModelHardBlock,
|
|
668
685
|
/**
|
|
669
686
|
* Fable/Mythos usage-limit errors map to tier-local weekly counters. Scope
|
|
670
687
|
* reactive backoff blocks for those tiers, mirroring the per-counter
|