@juspay/neurolink 9.31.0 → 9.31.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [9.31.1](https://github.com/juspay/neurolink/compare/v9.31.0...v9.31.1) (2026-03-25)
2
+
3
+ ### Bug Fixes
4
+
5
+ - **(proxy):** use stored tokenType instead of prefix heuristic for OAuth detection ([49b8db2](https://github.com/juspay/neurolink/commit/49b8db276e774dde30711603ac2d8632f1a3a0c7))
6
+
1
7
  ## [9.31.0](https://github.com/juspay/neurolink/compare/v9.30.0...v9.31.0) (2026-03-25)
2
8
 
3
9
  ### Features
@@ -260,10 +260,10 @@ export function createClaudeProxyRoutes(modelRouter, basePath = "", accountStrat
260
260
  logger.always(`[proxy] refreshed expired account=${key.split(":")[1] ?? key} at startup`);
261
261
  }
262
262
  // Detect whether this is an API key or an OAuth token.
263
- // API keys start with "sk-ant-" and must use x-api-key header.
264
- const accountType = accessToken.startsWith("sk-ant-")
265
- ? "api_key"
266
- : "oauth";
263
+ // Use the stored tokenType (set at auth time) rather than a
264
+ // prefix heuristic — both API keys (sk-ant-api03-…) and OAuth
265
+ // access tokens (sk-ant-oat01-…) share the "sk-ant-" prefix.
266
+ const accountType = tokens.tokenType === "Bearer" ? "oauth" : "api_key";
267
267
  accounts.push({
268
268
  key,
269
269
  label: key.split(":")[1] ?? key,
@@ -260,10 +260,10 @@ export function createClaudeProxyRoutes(modelRouter, basePath = "", accountStrat
260
260
  logger.always(`[proxy] refreshed expired account=${key.split(":")[1] ?? key} at startup`);
261
261
  }
262
262
  // Detect whether this is an API key or an OAuth token.
263
- // API keys start with "sk-ant-" and must use x-api-key header.
264
- const accountType = accessToken.startsWith("sk-ant-")
265
- ? "api_key"
266
- : "oauth";
263
+ // Use the stored tokenType (set at auth time) rather than a
264
+ // prefix heuristic — both API keys (sk-ant-api03-…) and OAuth
265
+ // access tokens (sk-ant-oat01-…) share the "sk-ant-" prefix.
266
+ const accountType = tokens.tokenType === "Bearer" ? "oauth" : "api_key";
267
267
  accounts.push({
268
268
  key,
269
269
  label: key.split(":")[1] ?? key,
@@ -260,10 +260,10 @@ export function createClaudeProxyRoutes(modelRouter, basePath = "", accountStrat
260
260
  logger.always(`[proxy] refreshed expired account=${key.split(":")[1] ?? key} at startup`);
261
261
  }
262
262
  // Detect whether this is an API key or an OAuth token.
263
- // API keys start with "sk-ant-" and must use x-api-key header.
264
- const accountType = accessToken.startsWith("sk-ant-")
265
- ? "api_key"
266
- : "oauth";
263
+ // Use the stored tokenType (set at auth time) rather than a
264
+ // prefix heuristic — both API keys (sk-ant-api03-…) and OAuth
265
+ // access tokens (sk-ant-oat01-…) share the "sk-ant-" prefix.
266
+ const accountType = tokens.tokenType === "Bearer" ? "oauth" : "api_key";
267
267
  accounts.push({
268
268
  key,
269
269
  label: key.split(":")[1] ?? key,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/neurolink",
3
- "version": "9.31.0",
3
+ "version": "9.31.1",
4
4
  "description": "Universal AI Development Platform with working MCP integration, multi-provider support, and professional CLI. Built-in tools operational, 58+ external MCP servers discoverable. Connect to filesystem, GitHub, database operations, and more. Build, test, and deploy AI applications with 13 providers: OpenAI, Anthropic, Google AI, AWS Bedrock, Azure, Hugging Face, Ollama, and Mistral AI.",
5
5
  "author": {
6
6
  "name": "Juspay Technologies",