opencode-kilocode-auth 1.0.0 → 1.0.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/plugin.ts +4 -3
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "opencode-kilocode-auth",
3
3
  "module": "index.ts",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "author": "ported from Kilo Code",
6
6
  "description": "OpenCode plugin for Kilo Code authentication with support for various models including Giga Potato",
7
7
  "files": [
package/src/plugin.ts CHANGED
@@ -64,7 +64,7 @@ export async function KilocodeAuthPlugin(input: PluginInput): Promise<Hooks> {
64
64
  }
65
65
 
66
66
  // Build base URL for OpenRouter-compatible API
67
- const baseURL = getApiUrl("/api/openrouter/v1", token)
67
+ const baseURL = getApiUrl("/api/openrouter", token)
68
68
 
69
69
  return {
70
70
  baseURL,
@@ -111,9 +111,10 @@ export async function KilocodeAuthPlugin(input: PluginInput): Promise<Hooks> {
111
111
  : new URL(typeof requestInput === "string" ? requestInput : (requestInput as Request).url)
112
112
 
113
113
  // Map to Kilo Code OpenRouter-compatible endpoint
114
+ // Kilo Code uses: https://api.kilo.ai/api/openrouter/chat/completions
114
115
  let url: URL
115
- if (parsed.pathname.includes("/chat/completions") || parsed.pathname.includes("/v1/chat/completions")) {
116
- url = new URL(getApiUrl("/api/openrouter/v1/chat/completions", currentToken))
116
+ if (parsed.pathname.includes("/chat/completions")) {
117
+ url = new URL(getApiUrl("/api/openrouter/chat/completions", currentToken))
117
118
  } else if (parsed.pathname.includes("/models")) {
118
119
  url = new URL(getApiUrl("/api/openrouter/models", currentToken))
119
120
  } else {