@oh-my-pi/pi-catalog 18.1.4 → 18.1.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.
Files changed (113) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/types/compat/auth-ids.d.ts +4 -0
  3. package/dist/types/compat/auth.d.ts +7 -0
  4. package/dist/types/compat/types.d.ts +215 -0
  5. package/dist/types/provider-models/descriptors.d.ts +9 -0
  6. package/dist/types/provider-models/openai-compat.d.ts +21 -0
  7. package/dist/types/types.d.ts +3 -1
  8. package/dist/types/wire/github-copilot.d.ts +31 -12
  9. package/package.json +4 -4
  10. package/src/compat/auth-ids.ts +157 -0
  11. package/src/compat/auth.ts +59 -0
  12. package/src/compat/axes.ts +3 -0
  13. package/src/compat/resolve.ts +1 -0
  14. package/src/compat/rules/README.md +57 -1
  15. package/src/compat/rules/auth/_order.kdl +13 -0
  16. package/src/compat/rules/auth/abliteration.kdl +9 -0
  17. package/src/compat/rules/auth/aiand.kdl +9 -0
  18. package/src/compat/rules/auth/aimlapi.kdl +3 -0
  19. package/src/compat/rules/auth/alibaba-coding-plan.kdl +5 -0
  20. package/src/compat/rules/auth/alibaba-token-plan.kdl +11 -0
  21. package/src/compat/rules/auth/amazon-bedrock.kdl +5 -0
  22. package/src/compat/rules/auth/anthropic.kdl +53 -0
  23. package/src/compat/rules/auth/azure.kdl +3 -0
  24. package/src/compat/rules/auth/baseten.kdl +9 -0
  25. package/src/compat/rules/auth/bedrock-mantle.kdl +5 -0
  26. package/src/compat/rules/auth/cerebras.kdl +9 -0
  27. package/src/compat/rules/auth/cline-pass.kdl +12 -0
  28. package/src/compat/rules/auth/cloudflare-ai-gateway.kdl +4 -0
  29. package/src/compat/rules/auth/coreweave.kdl +9 -0
  30. package/src/compat/rules/auth/cursor.kdl +5 -0
  31. package/src/compat/rules/auth/deepinfra.kdl +11 -0
  32. package/src/compat/rules/auth/deepseek.kdl +10 -0
  33. package/src/compat/rules/auth/devin.kdl +28 -0
  34. package/src/compat/rules/auth/exa.kdl +9 -0
  35. package/src/compat/rules/auth/firepass.kdl +14 -0
  36. package/src/compat/rules/auth/fireworks.kdl +16 -0
  37. package/src/compat/rules/auth/github-copilot.kdl +7 -0
  38. package/src/compat/rules/auth/gitlab-duo-agent.kdl +23 -0
  39. package/src/compat/rules/auth/gitlab-duo.kdl +24 -0
  40. package/src/compat/rules/auth/gmi-cloud.kdl +9 -0
  41. package/src/compat/rules/auth/google-antigravity.kdl +28 -0
  42. package/src/compat/rules/auth/google-gemini-cli.kdl +26 -0
  43. package/src/compat/rules/auth/google-vertex.kdl +5 -0
  44. package/src/compat/rules/auth/google.kdl +3 -0
  45. package/src/compat/rules/auth/groq.kdl +3 -0
  46. package/src/compat/rules/auth/huggingface.kdl +9 -0
  47. package/src/compat/rules/auth/kagi.kdl +9 -0
  48. package/src/compat/rules/auth/kilo.kdl +4 -0
  49. package/src/compat/rules/auth/kimi-code.kdl +18 -0
  50. package/src/compat/rules/auth/litellm.kdl +8 -0
  51. package/src/compat/rules/auth/llama.cpp.kdl +10 -0
  52. package/src/compat/rules/auth/lm-studio.kdl +7 -0
  53. package/src/compat/rules/auth/meta.kdl +9 -0
  54. package/src/compat/rules/auth/minimax-code-cn.kdl +9 -0
  55. package/src/compat/rules/auth/minimax-code.kdl +9 -0
  56. package/src/compat/rules/auth/minimax.kdl +3 -0
  57. package/src/compat/rules/auth/mistral.kdl +3 -0
  58. package/src/compat/rules/auth/moonshot.kdl +9 -0
  59. package/src/compat/rules/auth/nanogpt.kdl +9 -0
  60. package/src/compat/rules/auth/novita.kdl +12 -0
  61. package/src/compat/rules/auth/nvidia.kdl +11 -0
  62. package/src/compat/rules/auth/ollama-cloud.kdl +8 -0
  63. package/src/compat/rules/auth/ollama.kdl +9 -0
  64. package/src/compat/rules/auth/openai-codex-device.kdl +20 -0
  65. package/src/compat/rules/auth/openai-codex.kdl +33 -0
  66. package/src/compat/rules/auth/openai.kdl +3 -0
  67. package/src/compat/rules/auth/opencode-go.kdl +10 -0
  68. package/src/compat/rules/auth/opencode-zen.kdl +9 -0
  69. package/src/compat/rules/auth/openrouter.kdl +32 -0
  70. package/src/compat/rules/auth/parallel.kdl +9 -0
  71. package/src/compat/rules/auth/perplexity.kdl +7 -0
  72. package/src/compat/rules/auth/qianfan.kdl +9 -0
  73. package/src/compat/rules/auth/qwen-portal.kdl +9 -0
  74. package/src/compat/rules/auth/sakana.kdl +9 -0
  75. package/src/compat/rules/auth/siliconflow-cn.kdl +9 -0
  76. package/src/compat/rules/auth/siliconflow.kdl +9 -0
  77. package/src/compat/rules/auth/synthetic.kdl +9 -0
  78. package/src/compat/rules/auth/tavily.kdl +9 -0
  79. package/src/compat/rules/auth/together.kdl +14 -0
  80. package/src/compat/rules/auth/umans.kdl +9 -0
  81. package/src/compat/rules/auth/venice.kdl +9 -0
  82. package/src/compat/rules/auth/vercel-ai-gateway.kdl +8 -0
  83. package/src/compat/rules/auth/vllm.kdl +9 -0
  84. package/src/compat/rules/auth/wafer-serverless.kdl +11 -0
  85. package/src/compat/rules/auth/xai-oauth.kdl +27 -0
  86. package/src/compat/rules/auth/xai.kdl +9 -0
  87. package/src/compat/rules/auth/xiaomi-token-plan-ams.kdl +9 -0
  88. package/src/compat/rules/auth/xiaomi-token-plan-cn.kdl +9 -0
  89. package/src/compat/rules/auth/xiaomi-token-plan-sgp.kdl +9 -0
  90. package/src/compat/rules/auth/xiaomi.kdl +6 -0
  91. package/src/compat/rules/auth/yolo-auto.kdl +11 -0
  92. package/src/compat/rules/auth/zai-coding-plan.kdl +29 -0
  93. package/src/compat/rules/auth/zai.kdl +9 -0
  94. package/src/compat/rules/auth/zenmux.kdl +9 -0
  95. package/src/compat/rules/auth/zhipu-coding-plan.kdl +9 -0
  96. package/src/compat/rules/classes/gemini.kdl +2 -1
  97. package/src/compat/rules/classes/glm.kdl +29 -0
  98. package/src/compat/rules/classes/meta.kdl +3 -1
  99. package/src/compat/rules/providers/abliteration.kdl +8 -0
  100. package/src/compat/rules/providers/google-antigravity.kdl +6 -0
  101. package/src/compat/rules/providers/google-gemini-cli.kdl +12 -0
  102. package/src/compat/rules/runtime/behavior.kdl +13 -4
  103. package/src/compat/rules/taxonomy/_discovery.kdl +1 -1
  104. package/src/compat/rules/taxonomy/glm.kdl +3 -0
  105. package/src/compat/rules/taxonomy/meta.kdl +3 -0
  106. package/src/compat/rules.json +2324 -20
  107. package/src/compat/taxonomy.ts +31 -6
  108. package/src/compat/types.ts +215 -0
  109. package/src/models.json +3322 -1377
  110. package/src/provider-models/descriptors.ts +9 -0
  111. package/src/provider-models/openai-compat.ts +186 -63
  112. package/src/types.ts +3 -1
  113. package/src/wire/github-copilot.ts +49 -7
package/CHANGELOG.md CHANGED
@@ -2,6 +2,29 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [18.1.5] - 2026-09-03
6
+
7
+ ### Added
8
+
9
+ - Added the Abliteration (abliteration.ai) provider, including its documented abliterated-model catalog and live model discovery.
10
+ - Added the GLM 5.3 Promo 50 model.
11
+ - Added computer-use capability metadata to model configurations.
12
+ - Added declarative provider authentication policies covering login, refresh, environment-key, and credential behavior, with generated compatibility data and typed accessors.
13
+
14
+ ### Changed
15
+
16
+ - Gemini 3.8 Flash now supports reasoning modes and image inputs.
17
+ - Updated the GitHub Copilot API version to 2026-08-01.
18
+ - Reduced input pricing for the minimax/minimax-m2 model.
19
+ - Renamed Meta Model API contributor SKUs to use the Muse Spark 1.x (C) naming.
20
+
21
+ ### Fixed
22
+
23
+ - GitHub Copilot model discovery now respects the Copilot CLI identity, ensuring eligible enterprise and experimental models are available.
24
+ - Fixed startup failures when discovering Bedrock-style Mistral Mixtral models.
25
+ - Fixed Muse Spark 1.3 contributor models on OpenCode gateways so they use the correct Responses API route.
26
+ - Updated Meta and OpenCode Muse Spark 1.3 model metadata and capabilities, including context windows, reasoning levels, image input, pricing, and model naming; media-only Muse SKUs are no longer presented as chat models.
27
+
5
28
  ## [18.1.4] - 2026-09-02
6
29
 
7
30
  ### Changed
@@ -0,0 +1,4 @@
1
+ /** Every provider with an `auth/<id>.kdl` policy. */
2
+ export type AuthProviderId = "abliteration" | "aiand" | "aimlapi" | "alibaba-coding-plan" | "alibaba-token-plan" | "amazon-bedrock" | "anthropic" | "azure" | "baseten" | "bedrock-mantle" | "cerebras" | "cline-pass" | "cloudflare-ai-gateway" | "coreweave" | "cursor" | "deepinfra" | "deepseek" | "devin" | "exa" | "firepass" | "fireworks" | "github-copilot" | "gitlab-duo" | "gitlab-duo-agent" | "gmi-cloud" | "google" | "google-antigravity" | "google-gemini-cli" | "google-vertex" | "groq" | "huggingface" | "kagi" | "kilo" | "kimi-code" | "litellm" | "llama.cpp" | "lm-studio" | "meta" | "minimax" | "minimax-code" | "minimax-code-cn" | "mistral" | "moonshot" | "nanogpt" | "novita" | "nvidia" | "ollama" | "ollama-cloud" | "openai" | "openai-codex" | "openai-codex-device" | "opencode-go" | "opencode-zen" | "openrouter" | "parallel" | "perplexity" | "qianfan" | "qwen-portal" | "sakana" | "siliconflow" | "siliconflow-cn" | "synthetic" | "tavily" | "together" | "umans" | "venice" | "vercel-ai-gateway" | "vllm" | "wafer-serverless" | "xai" | "xai-oauth" | "xiaomi" | "xiaomi-token-plan-ams" | "xiaomi-token-plan-cn" | "xiaomi-token-plan-sgp" | "yolo-auto" | "zai" | "zai-coding-plan" | "zenmux" | "zhipu-coding-plan";
3
+ /** Providers whose policy declares a `login` flow (the `/login` roster). */
4
+ export type LoginProviderId = "abliteration" | "aiand" | "alibaba-coding-plan" | "alibaba-token-plan" | "anthropic" | "baseten" | "cerebras" | "cline-pass" | "cloudflare-ai-gateway" | "coreweave" | "cursor" | "deepinfra" | "deepseek" | "devin" | "exa" | "firepass" | "fireworks" | "github-copilot" | "gitlab-duo" | "gitlab-duo-agent" | "gmi-cloud" | "google-antigravity" | "google-gemini-cli" | "huggingface" | "kagi" | "kilo" | "kimi-code" | "litellm" | "llama.cpp" | "lm-studio" | "meta" | "minimax-code" | "minimax-code-cn" | "moonshot" | "nanogpt" | "novita" | "nvidia" | "ollama" | "ollama-cloud" | "openai-codex" | "openai-codex-device" | "opencode-go" | "opencode-zen" | "openrouter" | "parallel" | "perplexity" | "qianfan" | "qwen-portal" | "sakana" | "siliconflow" | "siliconflow-cn" | "synthetic" | "tavily" | "together" | "umans" | "venice" | "vercel-ai-gateway" | "vllm" | "wafer-serverless" | "xai" | "xai-oauth" | "xiaomi" | "xiaomi-token-plan-ams" | "xiaomi-token-plan-cn" | "xiaomi-token-plan-sgp" | "yolo-auto" | "zai" | "zai-coding-plan" | "zenmux" | "zhipu-coding-plan";
@@ -0,0 +1,7 @@
1
+ import type { CompiledAuthProvider } from "./types.js";
2
+ /** Every compiled auth provider in `/login` display order. */
3
+ export declare function authProviders(): readonly CompiledAuthProvider[];
4
+ /** The compiled auth policy for one provider id, if declared. */
5
+ export declare function authPolicyFor(provider: string): CompiledAuthProvider | undefined;
6
+ /** Every hook name referenced anywhere in the auth stratum, for registry completeness checks. */
7
+ export declare function authHookNames(): Record<string, string[]>;
@@ -302,6 +302,220 @@ export interface CompiledBehavior {
302
302
  pricingPeers: CompiledPricingPeer[];
303
303
  retiredProviders: string[];
304
304
  }
305
+ /**
306
+ * A string setting from `auth/*.kdl` that may be overridden by environment
307
+ * variables (consulted in order before `value`), stored obfuscated, or
308
+ * resolved at runtime by a named `@oh-my-pi/pi-ai` hook.
309
+ */
310
+ export interface CompiledAuthValue {
311
+ value?: string;
312
+ env?: string[];
313
+ /** `base64`: the rule tree stores the value base64-encoded; decode before use. */
314
+ encoding?: "base64";
315
+ /** Hook name resolving the value at runtime; mutually exclusive with `value`. */
316
+ hook?: string;
317
+ }
318
+ /** One API-key validation probe run after the user pastes a key. */
319
+ export type CompiledAuthValidation = {
320
+ kind: "chat-completions";
321
+ label?: string;
322
+ baseUrl: string;
323
+ model: string;
324
+ tolerateModelDenied?: boolean;
325
+ maxTokensField?: "max_tokens" | "max_completion_tokens";
326
+ maxTokens?: number;
327
+ optional?: boolean;
328
+ } | {
329
+ kind: "anthropic-messages";
330
+ label?: string;
331
+ baseUrl: string;
332
+ model: string;
333
+ optional?: boolean;
334
+ } | {
335
+ kind: "models-endpoint";
336
+ label?: string;
337
+ url: string;
338
+ /** Env var holding an alternate base URL; `/models` is appended to it. */
339
+ baseUrlEnv?: string;
340
+ /** Hook returning extra request headers (may throw a configuration error). */
341
+ headersHook?: string;
342
+ optional?: boolean;
343
+ };
344
+ /** Paste-an-API-key login: optional browser hint, prompt, optional validation. */
345
+ export interface CompiledApiKeyLogin {
346
+ kind: "api-key";
347
+ authUrl?: string;
348
+ instructions?: string;
349
+ prompt: string;
350
+ placeholder?: string;
351
+ /** Returned for an empty paste; presence also allows an empty answer. */
352
+ emptyFallback?: string;
353
+ normalize?: "strip-bearer";
354
+ validate?: CompiledAuthValidation;
355
+ }
356
+ /** How one `OAuthCredentials` field is derived from a token response. */
357
+ export interface CompiledCredentialField {
358
+ /** Dot path into the JSON response body. */
359
+ path?: string;
360
+ /** JWT claim name read from the access token payload (first present wins). */
361
+ claim?: string[];
362
+ literal?: string;
363
+ }
364
+ /** Expiry derivation for a token response. */
365
+ export type CompiledCredentialExpiry = {
366
+ mode: "seconds";
367
+ path: string;
368
+ fromPath?: string;
369
+ skewMs: number;
370
+ } | {
371
+ mode: "jwt";
372
+ skewMs: number;
373
+ fallbackMs?: number;
374
+ } | {
375
+ mode: "never";
376
+ };
377
+ /** Token-response → `OAuthCredentials` projection. */
378
+ export interface CompiledCredentialMap {
379
+ access: CompiledCredentialField;
380
+ refresh?: CompiledCredentialField;
381
+ expires: CompiledCredentialExpiry;
382
+ email?: CompiledCredentialField;
383
+ accountId?: CompiledCredentialField;
384
+ orgId?: CompiledCredentialField;
385
+ orgName?: CompiledCredentialField;
386
+ projectId?: CompiledCredentialField;
387
+ apiEndpoint?: CompiledCredentialField;
388
+ enterpriseUrl?: CompiledCredentialField;
389
+ }
390
+ /** Bearer GET that enriches credentials with identity fields. */
391
+ export interface CompiledUserinfo {
392
+ url: string;
393
+ email?: string;
394
+ accountId?: string;
395
+ }
396
+ /**
397
+ * One token-endpoint style request. `params` values may use `{placeholders}`
398
+ * (`code`, `state`, `redirect_uri`, `code_verifier`, `client_id`,
399
+ * `client_secret`, `refresh_token`, `device_code`, `scope`, `base`).
400
+ */
401
+ export interface CompiledOAuthRequest {
402
+ url: CompiledAuthValue;
403
+ body: "form" | "json";
404
+ /** Include the grant's standard parameter set before `params`. */
405
+ standard: boolean;
406
+ params: Record<string, string>;
407
+ headers: Record<string, string>;
408
+ timeoutMs?: number;
409
+ }
410
+ /** Loopback callback configuration for authorization-code logins. */
411
+ export interface CompiledCallback {
412
+ port: number;
413
+ path: string;
414
+ hostname: string;
415
+ redirectUri?: CompiledAuthValue;
416
+ portFallback: boolean;
417
+ manualOnly: boolean;
418
+ }
419
+ /** Authorization-code login through the loopback callback server. */
420
+ export interface CompiledOAuthCodeLogin {
421
+ kind: "oauth-code";
422
+ clientId?: CompiledAuthValue;
423
+ clientSecret?: CompiledAuthValue;
424
+ authorizeUrl: CompiledAuthValue;
425
+ scopes: string[];
426
+ scopeSeparator: string;
427
+ pkce: boolean;
428
+ state: "hex" | "uuid" | "none";
429
+ /** Include the standard authorize query set before `authorizeParams`. */
430
+ standardAuthorizeParams: boolean;
431
+ authorizeParams: Record<string, string>;
432
+ instructions?: string;
433
+ callback: CompiledCallback;
434
+ token: CompiledOAuthRequest;
435
+ credential: CompiledCredentialMap;
436
+ userinfo?: CompiledUserinfo;
437
+ /** Hook run on the mapped credentials with the raw token response. */
438
+ afterExchange?: string;
439
+ /** Manual input starting with `prefix` is a pasted API key, validated at `validateUrl`. */
440
+ pasteKey?: {
441
+ prefix: string;
442
+ validateUrl: string;
443
+ };
444
+ }
445
+ /** RFC 8628 device-code login. */
446
+ export interface CompiledDeviceCodeLogin {
447
+ kind: "device-code";
448
+ clientId: CompiledAuthValue;
449
+ /** `{base}` placeholder source for request URLs. */
450
+ baseUrl?: CompiledAuthValue;
451
+ scopes: string[];
452
+ scopeSeparator: string;
453
+ /** Hook returning headers merged into every request of the flow. */
454
+ headersHook?: string;
455
+ device: CompiledOAuthRequest;
456
+ token: CompiledOAuthRequest;
457
+ response: {
458
+ userCode: string;
459
+ deviceCode: string;
460
+ verificationUri: string;
461
+ verificationUriComplete?: string;
462
+ interval?: string;
463
+ expiresIn?: string;
464
+ };
465
+ /** `{user_code}` placeholder allowed. */
466
+ instructions: string;
467
+ credential: CompiledCredentialMap;
468
+ userinfo?: CompiledUserinfo;
469
+ afterExchange?: string;
470
+ }
471
+ /** Login implemented entirely by a named hook. */
472
+ export interface CompiledCustomLogin {
473
+ kind: "custom";
474
+ hook: string;
475
+ }
476
+ export type CompiledLogin = CompiledApiKeyLogin | CompiledOAuthCodeLogin | CompiledDeviceCodeLogin | CompiledCustomLogin;
477
+ /** Refresh-token grant declared for a provider. */
478
+ export type CompiledRefresh = {
479
+ kind: "none";
480
+ } | {
481
+ kind: "hook";
482
+ hook: string;
483
+ } | {
484
+ kind: "request";
485
+ token: CompiledOAuthRequest;
486
+ /** Stored credential fields that must be present before refreshing. */
487
+ require: string[];
488
+ credential: CompiledCredentialMap;
489
+ userinfo?: CompiledUserinfo;
490
+ afterRefresh?: string;
491
+ headersHook?: string;
492
+ };
493
+ /** One provider's compiled auth policy (`auth/<id>.kdl`). */
494
+ export interface CompiledAuthProvider {
495
+ id: string;
496
+ name: string;
497
+ env?: {
498
+ vars: string[];
499
+ } | {
500
+ hook: string;
501
+ };
502
+ allowsMissingApiKey?: boolean;
503
+ available?: boolean;
504
+ showInLoginList?: boolean;
505
+ storeAs?: string;
506
+ callbackPort?: number;
507
+ pasteCode?: boolean;
508
+ apiKeyFormat: "bearer" | "structured";
509
+ expiry?: "jwt-or-never";
510
+ /** `api-key`: an OAuth login persists only `credentials.access` as a plain API key. */
511
+ result?: "api-key";
512
+ login?: CompiledLogin;
513
+ refresh?: CompiledRefresh;
514
+ }
515
+ /** Compiled auth stratum: providers in `/login` display order. */
516
+ export interface CompiledAuth {
517
+ providers: CompiledAuthProvider[];
518
+ }
305
519
  /** The complete compiled rule tree persisted as `rules.json`. */
306
520
  export interface CompiledCompatRules {
307
521
  /** Compiled-format version; bump on incompatible shape changes. */
@@ -311,6 +525,7 @@ export interface CompiledCompatRules {
311
525
  taxonomy: CompiledTaxonomy;
312
526
  cascade: CompiledCascade;
313
527
  behavior: CompiledBehavior;
528
+ auth: CompiledAuth;
314
529
  }
315
530
  /** Structured identity of one classified model. */
316
531
  export interface ModelIdentity {
@@ -7,6 +7,15 @@
7
7
  */
8
8
  import type { ModelManagerConfig, ProviderCatalogEntry, ProviderDescriptor } from "./descriptor-types.js";
9
9
  export declare const CATALOG_PROVIDERS: readonly [{
10
+ readonly id: "abliteration";
11
+ readonly defaultModel: "abliterated-model";
12
+ readonly envVars: readonly ["ABLITERATION_API_KEY", "ABLIT_KEY"];
13
+ readonly createModelManagerOptions: (config: ModelManagerConfig) => import("../index.js").ModelManagerOptions<"openai-responses", unknown>;
14
+ readonly dynamicModelsAuthoritative: true;
15
+ readonly catalogDiscovery: {
16
+ readonly label: "Abliteration";
17
+ };
18
+ }, {
10
19
  readonly id: "aiand";
11
20
  readonly defaultModel: "moonshotai/kimi-k2.7-code";
12
21
  readonly envVars: readonly ["AIAND_API_KEY"];
@@ -488,6 +488,12 @@ export interface CoreWeaveModelManagerConfig {
488
488
  fetch?: FetchImpl;
489
489
  }
490
490
  export declare function coreWeaveModelManagerOptions(config?: CoreWeaveModelManagerConfig): ModelManagerOptions<"openai-completions">;
491
+ /**
492
+ * Muse Spark revisions served by Meta's first-party Responses API. Meta's
493
+ * `/v1/models` lists bare ids with no capability metadata, so every revision
494
+ * must be seeded here or discovery yields a text-only, non-reasoning model
495
+ * with an unknown context window.
496
+ */
491
497
  export declare const META_MUSE_STATIC_MODELS: readonly ModelSpec<"openai-responses">[];
492
498
  /**
493
499
  * OpenAI frontier models served exclusively through Bedrock Mantle's Responses
@@ -531,6 +537,21 @@ export interface AiandModelManagerConfig {
531
537
  * pricing metadata, so discovery is authoritative over the bundled seed.
532
538
  */
533
539
  export declare function aiandModelManagerOptions(config?: AiandModelManagerConfig): ModelManagerOptions<"openai-completions">;
540
+ /**
541
+ * Documented abliteration.ai catalog (docs.abliteration.ai/models, 2026-09)
542
+ * bundled so the provider is usable when generation and first boot have no
543
+ * live key. The `/v1/models` response is authoritative once discovery runs.
544
+ * Rows carry only the documented limits and pricing; the per-model reasoning
545
+ * ladders, alias map and wire quirks come from `rules/classes/glm.kdl` and
546
+ * `rules/providers/abliteration.kdl` via `buildModel`.
547
+ */
548
+ export declare const ABLITERATION_STATIC_MODELS: readonly ModelSpec<"openai-responses">[];
549
+ export interface AbliterationModelManagerConfig {
550
+ apiKey?: string;
551
+ baseUrl?: string;
552
+ fetch?: FetchImpl;
553
+ }
554
+ export declare function abliterationModelManagerOptions(config?: AbliterationModelManagerConfig): ModelManagerOptions<"openai-responses">;
534
555
  /**
535
556
  * Documented Yolo-Auto catalog (yolo-auto.com/docs, 2026-08) bundled so the
536
557
  * provider is usable when generation and first boot have no live key. The
@@ -781,8 +781,10 @@ export type ResolvedDevinCompat = Required<DevinCompat>;
781
781
  export interface GoogleCompat {
782
782
  /** Whether functionCall/functionResponse parts carry the `id` field. */
783
783
  supportsFunctionPartId?: boolean;
784
- /** Whether replayed thinking parts must be skipped when they carry no signature. */
784
+ /** Add the bypass sentinel to every unsigned Gemini function call. */
785
785
  requiresSkipThoughtSignature?: boolean;
786
+ /** Add the bypass sentinel when a Gemini turn's first function call is unsigned. */
787
+ requiresSkipThoughtSignatureOnFirstFunctionCall?: boolean;
786
788
  /** Drop unsigned thinking blocks from replayed history (Antigravity Claude). */
787
789
  dropUnsignedThinking?: boolean;
788
790
  /** Cloud Code Assist legacy `parameters` schema field instead of `parametersJsonSchema`. */
@@ -1,12 +1,15 @@
1
1
  import type { FetchImpl } from "../types.js";
2
- /**
3
- * GitHub Copilot wire metadata: API-key envelope parsing and endpoint
4
- * derivation shared by catalog discovery and the pi-ai OAuth flow. The device
5
- * login / token refresh flow lives in `@oh-my-pi/pi-ai`'s registry.
6
- */
7
- export declare const COPILOT_USER_AGENT: "opencode/1.3.15";
8
- export declare const OPENCODE_HEADERS: {
9
- readonly "User-Agent": "opencode/1.3.15";
2
+ /** Headers sent by Copilot CLI to GitHub API and OAuth endpoints. */
3
+ export declare const COPILOT_GITHUB_HEADERS: {
4
+ readonly "User-Agent": "copilot/1.0.82";
5
+ };
6
+ /** Copilot CLI identity sent to the Copilot API. */
7
+ export declare const COPILOT_CAPI_IDENTITY_HEADERS: {
8
+ readonly "User-Agent": "copilot/1.0.82";
9
+ readonly "Editor-Version": "copilot/1.0.82";
10
+ readonly "Copilot-Integration-Id": "copilot-developer-cli";
11
+ readonly "Copilot-Harness-Id": "copilot-sdk";
12
+ readonly "Openai-Intent": "conversation-agent";
10
13
  };
11
14
  /**
12
15
  * Copilot API version sent on `api.githubcopilot.com` requests (`/models`,
@@ -17,12 +20,28 @@ export declare const OPENCODE_HEADERS: {
17
20
  * of 1M for Claude Opus). Never send this to `api.github.com` REST endpoints —
18
21
  * they validate `X-GitHub-Api-Version` against the REST version vocabulary.
19
22
  */
20
- export declare const COPILOT_API_VERSION: "2026-06-01";
21
- /** Headers for `api.githubcopilot.com` (capi) requests: discovery, chat, policy. */
23
+ export declare const COPILOT_API_VERSION: "2026-08-01";
24
+ /** Headers shared by Copilot API model requests and model definitions. */
22
25
  export declare const COPILOT_API_HEADERS: {
23
- readonly "User-Agent": "opencode/1.3.15";
24
- readonly "X-GitHub-Api-Version": "2026-06-01";
26
+ readonly "User-Agent": "copilot/1.0.82";
27
+ readonly "Editor-Version": "copilot/1.0.82";
28
+ readonly "Copilot-Integration-Id": "copilot-developer-cli";
29
+ readonly "Copilot-Harness-Id": "copilot-sdk";
30
+ readonly "Openai-Intent": "conversation-agent";
31
+ readonly "X-GitHub-Api-Version": "2026-08-01";
32
+ };
33
+ /** Copilot CLI headers for user-initiated model discovery. */
34
+ export declare const COPILOT_DISCOVERY_HEADERS: {
35
+ readonly "User-Agent": "copilot/1.0.82";
36
+ readonly "Editor-Version": "copilot/1.0.82";
37
+ readonly "Copilot-Integration-Id": "copilot-developer-cli";
38
+ readonly "Copilot-Harness-Id": "copilot-sdk";
39
+ readonly "Openai-Intent": "conversation-agent";
40
+ readonly "X-GitHub-Api-Version": "2026-08-01";
41
+ readonly "X-Initiator": "user";
25
42
  };
43
+ /** Preserve model-specific headers while enforcing the current Copilot API identity. */
44
+ export declare function mergeCopilotApiHeaders(headers?: Readonly<Record<string, string>>): Record<string, string>;
26
45
  export type ParsedGitHubCopilotApiKey = {
27
46
  accessToken: string;
28
47
  enterpriseUrl?: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-catalog",
4
- "version": "18.1.4",
4
+ "version": "18.1.5",
5
5
  "description": "Model catalog for omp: bundled model database, provider discovery descriptors, model identity, classification, and equivalence",
6
6
  "homepage": "https://omp.sh",
7
7
  "author": "Stencil Labs, Inc.",
@@ -35,12 +35,12 @@
35
35
  "gen:proto": "bun scripts/generate-protocols.ts"
36
36
  },
37
37
  "dependencies": {
38
- "@oh-my-pi/omptype": "18.1.4",
39
- "@oh-my-pi/pi-utils": "18.1.4"
38
+ "@oh-my-pi/omptype": "18.1.5",
39
+ "@oh-my-pi/pi-utils": "18.1.5"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@bgotink/kdl": "0.4.0",
43
- "@oh-my-pi/pi-ai": "18.1.4",
43
+ "@oh-my-pi/pi-ai": "18.1.5",
44
44
  "@types/bun": "^1.3.14"
45
45
  },
46
46
  "engines": {
@@ -0,0 +1,157 @@
1
+ // Generated by `bun run gen:compat` from `src/compat/rules/auth/*.kdl`; do not edit.
2
+
3
+ /** Every provider with an `auth/<id>.kdl` policy. */
4
+ export type AuthProviderId =
5
+ | "abliteration"
6
+ | "aiand"
7
+ | "aimlapi"
8
+ | "alibaba-coding-plan"
9
+ | "alibaba-token-plan"
10
+ | "amazon-bedrock"
11
+ | "anthropic"
12
+ | "azure"
13
+ | "baseten"
14
+ | "bedrock-mantle"
15
+ | "cerebras"
16
+ | "cline-pass"
17
+ | "cloudflare-ai-gateway"
18
+ | "coreweave"
19
+ | "cursor"
20
+ | "deepinfra"
21
+ | "deepseek"
22
+ | "devin"
23
+ | "exa"
24
+ | "firepass"
25
+ | "fireworks"
26
+ | "github-copilot"
27
+ | "gitlab-duo"
28
+ | "gitlab-duo-agent"
29
+ | "gmi-cloud"
30
+ | "google"
31
+ | "google-antigravity"
32
+ | "google-gemini-cli"
33
+ | "google-vertex"
34
+ | "groq"
35
+ | "huggingface"
36
+ | "kagi"
37
+ | "kilo"
38
+ | "kimi-code"
39
+ | "litellm"
40
+ | "llama.cpp"
41
+ | "lm-studio"
42
+ | "meta"
43
+ | "minimax"
44
+ | "minimax-code"
45
+ | "minimax-code-cn"
46
+ | "mistral"
47
+ | "moonshot"
48
+ | "nanogpt"
49
+ | "novita"
50
+ | "nvidia"
51
+ | "ollama"
52
+ | "ollama-cloud"
53
+ | "openai"
54
+ | "openai-codex"
55
+ | "openai-codex-device"
56
+ | "opencode-go"
57
+ | "opencode-zen"
58
+ | "openrouter"
59
+ | "parallel"
60
+ | "perplexity"
61
+ | "qianfan"
62
+ | "qwen-portal"
63
+ | "sakana"
64
+ | "siliconflow"
65
+ | "siliconflow-cn"
66
+ | "synthetic"
67
+ | "tavily"
68
+ | "together"
69
+ | "umans"
70
+ | "venice"
71
+ | "vercel-ai-gateway"
72
+ | "vllm"
73
+ | "wafer-serverless"
74
+ | "xai"
75
+ | "xai-oauth"
76
+ | "xiaomi"
77
+ | "xiaomi-token-plan-ams"
78
+ | "xiaomi-token-plan-cn"
79
+ | "xiaomi-token-plan-sgp"
80
+ | "yolo-auto"
81
+ | "zai"
82
+ | "zai-coding-plan"
83
+ | "zenmux"
84
+ | "zhipu-coding-plan";
85
+
86
+ /** Providers whose policy declares a `login` flow (the `/login` roster). */
87
+ export type LoginProviderId =
88
+ | "abliteration"
89
+ | "aiand"
90
+ | "alibaba-coding-plan"
91
+ | "alibaba-token-plan"
92
+ | "anthropic"
93
+ | "baseten"
94
+ | "cerebras"
95
+ | "cline-pass"
96
+ | "cloudflare-ai-gateway"
97
+ | "coreweave"
98
+ | "cursor"
99
+ | "deepinfra"
100
+ | "deepseek"
101
+ | "devin"
102
+ | "exa"
103
+ | "firepass"
104
+ | "fireworks"
105
+ | "github-copilot"
106
+ | "gitlab-duo"
107
+ | "gitlab-duo-agent"
108
+ | "gmi-cloud"
109
+ | "google-antigravity"
110
+ | "google-gemini-cli"
111
+ | "huggingface"
112
+ | "kagi"
113
+ | "kilo"
114
+ | "kimi-code"
115
+ | "litellm"
116
+ | "llama.cpp"
117
+ | "lm-studio"
118
+ | "meta"
119
+ | "minimax-code"
120
+ | "minimax-code-cn"
121
+ | "moonshot"
122
+ | "nanogpt"
123
+ | "novita"
124
+ | "nvidia"
125
+ | "ollama"
126
+ | "ollama-cloud"
127
+ | "openai-codex"
128
+ | "openai-codex-device"
129
+ | "opencode-go"
130
+ | "opencode-zen"
131
+ | "openrouter"
132
+ | "parallel"
133
+ | "perplexity"
134
+ | "qianfan"
135
+ | "qwen-portal"
136
+ | "sakana"
137
+ | "siliconflow"
138
+ | "siliconflow-cn"
139
+ | "synthetic"
140
+ | "tavily"
141
+ | "together"
142
+ | "umans"
143
+ | "venice"
144
+ | "vercel-ai-gateway"
145
+ | "vllm"
146
+ | "wafer-serverless"
147
+ | "xai"
148
+ | "xai-oauth"
149
+ | "xiaomi"
150
+ | "xiaomi-token-plan-ams"
151
+ | "xiaomi-token-plan-cn"
152
+ | "xiaomi-token-plan-sgp"
153
+ | "yolo-auto"
154
+ | "zai"
155
+ | "zai-coding-plan"
156
+ | "zenmux"
157
+ | "zhipu-coding-plan";
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Typed accessors over the compiled auth stratum (`rules/auth/*.kdl`): per
3
+ * provider display metadata, env-var fallbacks and the declarative login /
4
+ * refresh flow that `@oh-my-pi/pi-ai`'s registry engines interpret.
5
+ */
6
+ import rules from "./rules.json";
7
+ import type { CompiledAuthProvider } from "./types";
8
+
9
+ const providers = rules.auth.providers as readonly CompiledAuthProvider[];
10
+ const byId: Record<string, CompiledAuthProvider> = Object.fromEntries(providers.map(p => [p.id, p]));
11
+
12
+ /** Every compiled auth provider in `/login` display order. */
13
+ export function authProviders(): readonly CompiledAuthProvider[] {
14
+ return providers;
15
+ }
16
+
17
+ /** The compiled auth policy for one provider id, if declared. */
18
+ export function authPolicyFor(provider: string): CompiledAuthProvider | undefined {
19
+ return byId[provider];
20
+ }
21
+
22
+ /** Every hook name referenced anywhere in the auth stratum, for registry completeness checks. */
23
+ export function authHookNames(): Record<string, string[]> {
24
+ const names: Record<string, string[]> = {};
25
+ const add = (kind: string, name: string | undefined) => {
26
+ if (!name) return;
27
+ (names[kind] ??= []).push(name);
28
+ };
29
+ for (const p of providers) {
30
+ if (p.env && "hook" in p.env) add("env", p.env.hook);
31
+ const login = p.login;
32
+ if (login?.kind === "custom") add("login", login.hook);
33
+ if (login?.kind === "api-key" && login.validate?.kind === "models-endpoint") {
34
+ add("headers", login.validate.headersHook);
35
+ }
36
+ if (login?.kind === "oauth-code") {
37
+ add("after-exchange", login.afterExchange);
38
+ add("value", login.clientId?.hook);
39
+ add("value", login.authorizeUrl.hook);
40
+ add("value", login.token.url.hook);
41
+ }
42
+ if (login?.kind === "device-code") {
43
+ add("after-exchange", login.afterExchange);
44
+ add("headers", login.headersHook);
45
+ add("value", login.clientId.hook);
46
+ add("value", login.baseUrl?.hook);
47
+ add("value", login.device.url.hook);
48
+ add("value", login.token.url.hook);
49
+ }
50
+ const refresh = p.refresh;
51
+ if (refresh?.kind === "hook") add("refresh", refresh.hook);
52
+ if (refresh?.kind === "request") {
53
+ add("after-exchange", refresh.afterRefresh);
54
+ add("headers", refresh.headersHook);
55
+ add("value", refresh.token.url.hook);
56
+ }
57
+ }
58
+ return names;
59
+ }
@@ -217,6 +217,9 @@ export const AXES: Readonly<Record<string, AxisDef>> = {
217
217
  "flash-stream-leak-workaround": wire("flashStreamLeakWorkaround", ["google"]),
218
218
  "multimodal-function-response": wire("multimodalFunctionResponse", ["google"]),
219
219
  "requires-skip-thought-signature": wire("requiresSkipThoughtSignature", ["google"]),
220
+ "requires-skip-thought-signature-on-first-function-call": wire("requiresSkipThoughtSignatureOnFirstFunctionCall", [
221
+ "google",
222
+ ]),
220
223
  "supports-function-part-id": wire("supportsFunctionPartId", ["google"]),
221
224
 
222
225
  // ── wire: shared across surfaces ──
@@ -903,6 +903,7 @@ function resolveGooglePolicy(
903
903
  const compat: ResolvedGoogleCompat = {
904
904
  supportsFunctionPartId: false,
905
905
  requiresSkipThoughtSignature: false,
906
+ requiresSkipThoughtSignatureOnFirstFunctionCall: false,
906
907
  dropUnsignedThinking: false,
907
908
  ccaLegacyParametersSchema: false,
908
909
  multimodalFunctionResponse: false,