Skip to content

feat: add Poe provider#5560

Merged
kevinvandijk merged 5 commits intoKilo-Org:mainfrom
marciepeters:feature/poe-provider
Feb 21, 2026
Merged

feat: add Poe provider#5560
kevinvandijk merged 5 commits intoKilo-Org:mainfrom
marciepeters:feature/poe-provider

Conversation

@marciepeters
Copy link
Copy Markdown

Context

Poe.com is an AI aggregation product built by Quora, and it's where I work. About six moths ago, Poe launched an OpenAI compatible API offering to compliment their more UI/website focused offering.

A significant chunk of Poe's API usage is coming from Kilocode users, as can be seen on https://poe.com/leaderboard. Currently, Kilocode users who are using Poe are using the existing OpenAI Compatible provider that Kilocode already has. This PR makes it easier to use Kilocode with Poe by adding a Poe provider to Kilocode.

Implementation

The proposed Poe provider follows the common example set by existing providers. A Poe specific fetcher pulls from api.poe.com/v1/models for a list of available models and options. A Poe handler handles requests to api.poe.com/v1/chat/completions. The webview and various config dictionaries were updated with Poe as a provider. There is a new documentation markdown file that reviews how to use Poe as a provider.

Screenshots

This screen shot shows Poe in the drop down list of providers:

Screenshot 2026-01-30 at 3 43 17 PM

This screen shot shows selecting a model from Poe:

Screenshot 2026-01-30 at 3 42 01 PM

How to Test

  1. Sign up for an account on poe.com. I think we offer free users a small amount of API credit (?).
  2. Get a Poe api key from https://poe.com/api/keys
  3. Under Kilocode settings, create a new Configuration Profile called 'Poe Test'
  4. Select Poe as provider from the provider drop down
  5. Enter your Poe api key into the appropriate field
  6. Choose a model
  7. Make 'Poe Test' your active profile
  8. Ask Kilocode to perform some task

Get in Touch

I can be emailed at mpeters @ quora dot com. I have discord, but don't use it much. If it would be helpful I can join on the project discord to discuss anything that arises.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jan 30, 2026

🦋 Changeset detected

Latest commit: ae8aa3f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
kilo-code Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment thread src/api/providers/poe.ts
reasoningEffort: ReasoningEffortExtended | undefined,
): { thinking_budget?: number; reasoning_effort?: OpenAI.Chat.ChatCompletionCreateParams["reasoning_effort"] } {
const isAnthropicModel = modelId.startsWith("claude-")
const isOpenAiModel = modelId.startsWith("gpt-")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[WARNING]: isOpenAiModel check misses OpenAI reasoning models

The startsWith("gpt-") check won't match OpenAI's reasoning models like o1, o3, o4-mini, etc. This means reasoning_effort won't be sent for those models when accessed through Poe, even though the model metadata indicates they support it.

Consider also matching o1, o3, o4 prefixes, e.g.:

Suggested change
const isOpenAiModel = modelId.startsWith("gpt-")
const isOpenAiModel = modelId.startsWith("gpt-") || /^o[1-9]/.test(modelId)

@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented Feb 21, 2026

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
src/api/providers/poe.ts 83 isOpenAiModel check uses modelId.startsWith("gpt-") which misses OpenAI reasoning models (e.g., o1-, o3-, o4-mini) — these models also support reasoning_effort

SUGGESTION

File Line Issue
src/api/providers/fetchers/poe.ts 22 response.data.data could be undefined or non-iterable if the Poe API returns an unexpected response shape — add a defensive guard like rawModels ?? []
Files Reviewed (30 files)
  • .changeset/add-poe-provider.md
  • apps/kilocode-docs/docs/providers/poe.md
  • packages/core-schemas/src/config/provider.ts
  • packages/types/src/provider-settings.ts
  • packages/types/src/providers/index.ts
  • packages/types/src/providers/poe.ts
  • src/api/index.ts
  • src/api/providers/__tests__/poe.spec.ts
  • src/api/providers/fetchers/poe.ts
  • src/api/providers/index.ts
  • src/api/providers/poe.ts
  • src/core/webview/__tests__/ClineProvider.spec.ts
  • src/core/webview/__tests__/webviewMessageHandler.spec.ts
  • src/core/webview/webviewMessageHandler.ts
  • src/shared/api.ts
  • webview-ui/src/components/kilocode/hooks/__tests__/getModelsByProvider.spec.ts
  • webview-ui/src/components/kilocode/hooks/useProviderModels.ts
  • webview-ui/src/components/settings/ApiOptions.tsx
  • webview-ui/src/components/settings/ModelPicker.tsx
  • webview-ui/src/components/settings/constants.ts
  • webview-ui/src/components/settings/providers/Poe.tsx
  • webview-ui/src/components/settings/providers/index.ts
  • webview-ui/src/components/ui/hooks/useSelectedModel.ts
  • webview-ui/src/i18n/locales/en/settings.json + 18 other locale files
  • webview-ui/src/utils/__tests__/validate.spec.ts

Fix these issues in Kilo Cloud

const response = await axios.get(modelsUrl.toString(), { headers })
const rawModels = response.data.data

for (const rawModel of rawModels) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[SUGGESTION]: Add a defensive check for rawModels before iterating

If the Poe API returns an unexpected response shape (e.g., response.data.data is undefined or not an array), the for...of loop will throw a TypeError: rawModels is not iterable. While this is caught by the surrounding try/catch, it would silently return empty models with only a console error, making it hard to diagnose.

Consider adding a guard:

Suggested change
for (const rawModel of rawModels) {
for (const rawModel of rawModels ?? []) {

Alternatively, validate Array.isArray(rawModels) and log a more descriptive error if the response shape is unexpected.

Copy link
Copy Markdown
Contributor

@kevinvandijk kevinvandijk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants