Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/add-poe-provider.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"kilo-code": minor
---

Add Poe as a supported API provider
29 changes: 29 additions & 0 deletions apps/kilocode-docs/docs/providers/poe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
sidebar_label: Poe
---

# Using Poe With Kilo Code

Kilo Code supports accessing models through the [Poe](https://www.poe.com/) platform. Poe provides an easy and optimized API for interacting with 200+ large language models (LLMs).

**Website:** [https://www.poe.com/](https://www.poe.com/)

## Getting an API Key

1. **Sign Up/Sign In:** Go to the [Poe website](https://www.poe.com/) and create an account or sign in.
2. **Get API Key:** You can get an API key from the [API Management](https://poe.com/api_key) section of your Poe dashboard.

## Supported Models

Poe provides access to a wide range of models. Kilo Code will automatically fetch the latest list of available models. You can see the full list of available models on the [Model List](https://poe.com/explore?category=Official) page.

## Configuration in Kilo Code

1. **Open Kilo Code Settings:** Click the gear icon (<Codicon name="gear" />) in the Kilo Code panel.
2. **Select Provider:** Choose "Poe" from the "API Provider" dropdown.
3. **Enter API Key:** Paste your Poe API key into the "Poe API Key" field.
4. **Select Model:** Choose your desired model from the "Model" dropdown.

## Relevant resources

- [Poe Discord](https://discord.com/invite/joinpoe)
11 changes: 11 additions & 0 deletions packages/core-schemas/src/config/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,15 @@ export const deepInfraProviderSchema = baseProviderSchema.extend({
deepInfraApiKey: z.string().optional(),
})

// kilocode_change start
// Poe provider
export const poeProviderSchema = baseProviderSchema.extend({
provider: z.literal("poe"),
poeModelId: z.string().optional(),
poeApiKey: z.string().optional(),
})
// kilocode_change end

// Unbound provider
export const unboundProviderSchema = baseProviderSchema.extend({
provider: z.literal("unbound"),
Expand Down Expand Up @@ -428,6 +437,7 @@ export const providerConfigSchema = z.discriminatedUnion("provider", [
glamaProviderSchema,
liteLLMProviderSchema,
deepInfraProviderSchema,
poeProviderSchema, // kilocode_change
unboundProviderSchema,
requestyProviderSchema,
vercelAiGatewayProviderSchema,
Expand Down Expand Up @@ -475,6 +485,7 @@ export type LMStudioProviderConfig = z.infer<typeof lmStudioProviderSchema>
export type GlamaProviderConfig = z.infer<typeof glamaProviderSchema>
export type LiteLLMProviderConfig = z.infer<typeof liteLLMProviderSchema>
export type DeepInfraProviderConfig = z.infer<typeof deepInfraProviderSchema>
export type PoeProviderConfig = z.infer<typeof poeProviderSchema> // kilocode_change
export type UnboundProviderConfig = z.infer<typeof unboundProviderSchema>
export type RequestyProviderConfig = z.infer<typeof requestyProviderSchema>
export type VercelAiGatewayProviderConfig = z.infer<typeof vercelAiGatewayProviderSchema>
Expand Down
13 changes: 13 additions & 0 deletions packages/types/src/provider-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export const dynamicProviders = [
"roo",
"chutes",
"nano-gpt", //kilocode_change
"poe", // kilocode_change
] as const

export type DynamicProvider = (typeof dynamicProviders)[number]
Expand Down Expand Up @@ -414,6 +415,13 @@ const deepInfraSchema = apiModelIdProviderModelSchema.extend({
deepInfraModelId: z.string().optional(),
})

// kilocode_change start
const poeSchema = baseProviderSettingsSchema.extend({
poeApiKey: z.string().optional(),
poeModelId: z.string().optional(),
})
// kilocode_change end

const doubaoSchema = apiModelIdProviderModelSchema.extend({
doubaoBaseUrl: z.string().optional(),
doubaoApiKey: z.string().optional(),
Expand Down Expand Up @@ -624,6 +632,7 @@ export const providerSettingsSchemaDiscriminated = z.discriminatedUnion("apiProv
mistralSchema.merge(z.object({ apiProvider: z.literal("mistral") })),
deepSeekSchema.merge(z.object({ apiProvider: z.literal("deepseek") })),
deepInfraSchema.merge(z.object({ apiProvider: z.literal("deepinfra") })),
poeSchema.merge(z.object({ apiProvider: z.literal("poe") })), // kilocode_change
doubaoSchema.merge(z.object({ apiProvider: z.literal("doubao") })),
moonshotSchema.merge(z.object({ apiProvider: z.literal("moonshot") })),
minimaxSchema.merge(z.object({ apiProvider: z.literal("minimax") })),
Expand Down Expand Up @@ -689,6 +698,7 @@ export const providerSettingsSchema = z.object({
...mistralSchema.shape,
...deepSeekSchema.shape,
...deepInfraSchema.shape,
...poeSchema.shape, // kilocode_change
...doubaoSchema.shape,
...moonshotSchema.shape,
...minimaxSchema.shape,
Expand Down Expand Up @@ -750,6 +760,7 @@ export const modelIdKeys = [
"ioIntelligenceModelId",
"vercelAiGatewayModelId",
"deepInfraModelId",
"poeModelId", // kilocode_change
"kilocodeModel",
"ovhCloudAiEndpointsModelId", // kilocode_change
"inceptionLabsModelId", // kilocode_change
Expand Down Expand Up @@ -793,6 +804,7 @@ export const modelIdKeysByProvider: Record<TypicalProvider, ModelIdKey> = {
minimax: "apiModelId",
deepseek: "apiModelId",
deepinfra: "deepInfraModelId",
poe: "poeModelId", // kilocode_change
doubao: "apiModelId",
"qwen-code": "apiModelId",
unbound: "unboundModelId",
Expand Down Expand Up @@ -985,6 +997,7 @@ export const MODELS_BY_PROVIDER: Record<
zenmux: { id: "zenmux", label: "ZenMux", models: [] }, // kilocode_change
// kilocode_change end
deepinfra: { id: "deepinfra", label: "DeepInfra", models: [] },
poe: { id: "poe", label: "Poe", models: [] }, // kilocode_change
"vercel-ai-gateway": { id: "vercel-ai-gateway", label: "Vercel AI Gateway", models: [] },
chutes: { id: "chutes", label: "Chutes AI", models: [] },

Expand Down
4 changes: 4 additions & 0 deletions packages/types/src/providers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export * from "./openai.js"
export * from "./openai-codex.js"
export * from "./openai-codex-rate-limits.js"
export * from "./openrouter.js"
export * from "./poe.js" // kilocode_change
export * from "./qwen-code.js"
export * from "./requesty.js"
export * from "./roo.js"
Expand Down Expand Up @@ -69,6 +70,7 @@ import { mistralDefaultModelId } from "./mistral.js"
import { moonshotDefaultModelId } from "./moonshot.js"
import { openAiCodexDefaultModelId } from "./openai-codex.js"
import { openRouterDefaultModelId } from "./openrouter.js"
import { poeDefaultModelId } from "./poe.js" // kilocode_change
import { qwenCodeDefaultModelId } from "./qwen-code.js"
import { requestyDefaultModelId } from "./requesty.js"
import { rooDefaultModelId } from "./roo.js"
Expand Down Expand Up @@ -97,6 +99,8 @@ export function getProviderDefaultModelId(
switch (provider) {
case "openrouter":
return openRouterDefaultModelId
case "poe": // kilocode_change
return poeDefaultModelId // kilocode_change
case "zenmux": // kilocode_change
return zenmuxDefaultModelId // kilocode_change
case "requesty":
Expand Down
18 changes: 18 additions & 0 deletions packages/types/src/providers/poe.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// kilocode_change - new file
import type { ModelInfo } from "../model.js"

export const POE_BASE_URL = "https://api.poe.com/v1/"

// Default fallback values for Poe when model metadata is not yet loaded.
export const poeDefaultModelId = "gpt-4o"

export const poeDefaultModelInfo: ModelInfo = {
maxTokens: 8192,
contextWindow: 128000,
supportsImages: true,
supportsPromptCache: false,
supportsNativeTools: true,
inputPrice: 2.25,
outputPrice: 9.0,
description: "GPT-4o via Poe API",
}
5 changes: 5 additions & 0 deletions src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
AwsBedrockHandler,
CerebrasHandler,
OpenRouterHandler,
PoeHandler, // kilocode_change
ZenMuxHandler, // kilocode_change
VertexHandler,
AnthropicVertexHandler,
Expand Down Expand Up @@ -191,6 +192,10 @@ export function buildApiHandler(configuration: ProviderSettings): ApiHandler {
// kilocode_change end
case "openrouter":
return new OpenRouterHandler(options)
// kilocode_change start
case "poe":
return new PoeHandler(options)
// kilocode_change end
case "zenmux": // kilocode_change
return new ZenMuxHandler(options) // kilocode_change
case "bedrock":
Expand Down
Loading
Loading