feat: Add Kilo Gateway as AI provider
Add full support for Kilo Gateway AI provider across the codebase: - Add custom loader for 'kilo' provider in provider.ts with API key detection - Add auth CLI hint for Kilo Gateway in auth.ts - Add Kilo to DEFAULT_PROVIDER_SEEDS in chat server.js - Add Kilo to PLANNING_PROVIDERS for planning chain support - Add Kilo provider configuration with baseURL and API key support - Update admin env config to show Kilo API key status Kilo Gateway provides access to 500+ AI models through a single OpenAI-compatible endpoint at https://api.kilo.ai/api/gateway
This commit is contained in:
@@ -358,6 +358,12 @@ export const AuthLoginCommand = cmd({
|
||||
)
|
||||
}
|
||||
|
||||
if (provider === "kilo") {
|
||||
prompts.log.info(
|
||||
"Get your Kilo Gateway API key at https://app.kilo.ai/api-keys",
|
||||
)
|
||||
}
|
||||
|
||||
const key = await prompts.password({
|
||||
message: "Enter your API key",
|
||||
validate: (x) => (x && x.length > 0 ? undefined : "Required"),
|
||||
|
||||
@@ -636,6 +636,24 @@ export namespace Provider {
|
||||
options: {},
|
||||
}
|
||||
},
|
||||
kilo: async (input) => {
|
||||
const apiKey = await (async () => {
|
||||
const envKey = Env.get("KILO_API_KEY")
|
||||
if (envKey) return envKey
|
||||
const auth = await Auth.get(input.id)
|
||||
if (auth?.type === "api") return auth.key
|
||||
return undefined
|
||||
})()
|
||||
|
||||
if (!apiKey) {
|
||||
return { autoload: false }
|
||||
}
|
||||
|
||||
return {
|
||||
autoload: true,
|
||||
options: {},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
export const Model = z
|
||||
|
||||
Reference in New Issue
Block a user