@madgagarin/pi-agentrouter 1.0.3 → 1.0.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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/index.ts +2 -9
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @madgagarin/pi-agentrouter
1
+ # pi-agentrouter
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@madgagarin/pi-agentrouter.svg?color=blue)](https://www.npmjs.com/package/@madgagarin/pi-agentrouter)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
package/index.ts CHANGED
@@ -31,14 +31,7 @@ export function saveConfig(cfg: AgentRouterConfig): void {
31
31
 
32
32
  export function normalizeApiKey(key?: string): string {
33
33
  if (!key) return "";
34
- let clean = key.trim().replace(/^["']|["']$/g, "").trim();
35
- if (clean.toLowerCase().startsWith("bearer ")) {
36
- clean = clean.slice(7).trim();
37
- }
38
- if (clean.startsWith("sk-")) {
39
- clean = clean.slice(3).trim();
40
- }
41
- return clean;
34
+ return key.trim().replace(/^["']|["']$/g, "").trim();
42
35
  }
43
36
 
44
37
  const initialConfig = loadConfig();
@@ -222,7 +215,7 @@ export default function (pi: ExtensionAPI) {
222
215
  currentApiKey = cleanKey;
223
216
  saveConfig({ apiKey: cleanKey, minIntervalMs });
224
217
  registerAgentRouterProviders(cleanKey);
225
- ctx.ui.notify("AgentRouter API key updated and normalized successfully for all models.", "info");
218
+ ctx.ui.notify("AgentRouter API key updated successfully for all models.", "info");
226
219
  return;
227
220
  }
228
221
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@madgagarin/pi-agentrouter",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Pi coding agent extension for AgentRouter (GPT-5.6 Sol & Claude Opus 5) with rate-limit pacing and caching.",
5
5
  "publishConfig": {
6
6
  "access": "public"