pi-diagnostics 0.3.0 → 0.3.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/core.ts +3 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-diagnostics",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Prompt-cache diagnostics and expiry reminders for pi",
5
5
  "keywords": [
6
6
  "pi",
package/src/core.ts CHANGED
@@ -27,12 +27,7 @@ export const API_KIND: Record<string, DiagnosticsKind> = {
27
27
  "openai-codex-responses": "openai",
28
28
  };
29
29
 
30
- /**
31
- * Provider entries are `provider` (every supported API) or `provider:kind` (one dialect).
32
- * Ramp Router is limited to its OpenAI Responses adapter: its Anthropic Messages route returns
33
- * `diagnostics: null` for every response, even for requests whose tools and system prompt changed.
34
- */
35
- export const DEFAULT_PROVIDERS = ["anthropic", "openai", "ramp-router:openai"];
30
+ export const DEFAULT_PROVIDERS = ["anthropic", "openai", "ramp-router"];
36
31
 
37
32
  export interface ModelRef {
38
33
  provider: string;
@@ -42,10 +37,7 @@ export interface ModelRef {
42
37
 
43
38
  export interface Config {
44
39
  enabled: boolean;
45
- /**
46
- * Provider entries allowed to receive diagnostics fields: `provider`, `provider:anthropic`,
47
- * `provider:openai`, or "*" for every provider on a supported API.
48
- */
40
+ /** Provider names allowed to receive diagnostics fields. "*" allows every provider on a supported API. */
49
41
  providers: string[];
50
42
  /** When to show a UI notification. */
51
43
  notify: "miss" | "all" | "off";
@@ -68,9 +60,7 @@ export function kindFor(model: ModelRef | undefined, config: Config): Diagnostic
68
60
  if (!config.enabled || !model) return undefined;
69
61
  const kind = API_KIND[model.api];
70
62
  if (!kind) return undefined;
71
- const allowed = config.providers.includes("*")
72
- || config.providers.includes(model.provider)
73
- || config.providers.includes(`${model.provider}:${kind}`);
63
+ const allowed = config.providers.includes("*") || config.providers.includes(model.provider);
74
64
  return allowed ? kind : undefined;
75
65
  }
76
66