Skip to content

feat(poe): default to the openai responses api endpoint - #14144

Open
kovsu wants to merge 12 commits into
CherryHQ:mainfrom
kovsu:hotfix/poe-custom-provider
Open

feat(poe): default to the openai responses api endpoint#14144
kovsu wants to merge 12 commits into
CherryHQ:mainfrom
kovsu:hotfix/poe-custom-provider

Conversation

@kovsu

@kovsu kovsu commented Apr 9, 2026

Copy link
Copy Markdown
Collaborator

Branch strategy

  • Active development targets main.

What this PR does

Before this PR:

Poe was a chat-completions-only registry entry (plus the Anthropic-compatible mirror for official Claude bots). On chat-completions, reasoning is fail-closed by design and only works for the model families with audited per-model extra_body contracts (GPT-5.4, Gemini 3.1 Pro, Claude bots); every other bot has no reasoning control, and built-in web search rides the Poe-specific extra_body.web_search parameter.

After this PR:

Poe's registry entry declares the OpenAI Responses API endpoint (https://api.poe.com/v1/, which Poe now serves natively) and makes it the default chat endpoint:

  • Reasoning: the standard openai-responses reasoning format applies to all bots — no per-model contract needed on this path.
  • Web search: the standard Responses web_search tool via the existing server-tools config.
  • Chat-completions stays as a fallback endpoint and keeps its current behavior unchanged (fail-closed wire + the per-model extra_body contracts); the anthropic-messages endpoint for official Claude bots is untouched.
  • Poe website metadata updated to the current URLs (creator.poe.com/docs, poe.com/api/models).
  • A registry contract test locks the routing: default endpoint is openai-responses with the standard reasoning format, chat-completions stays fail-closed (provider-reasoning-contracts.test.ts).

Fixes #

Why we need it and why it was done in this way

The following tradeoffs were made:

The following alternatives were considered:

  • 3-way model-ID routing (Claude → Anthropic SDK, GPT/O-series → Responses, rest → Chat Completions) — an earlier iteration; rejected as unnecessary once Poe shipped native Responses support.
  • Pinning existing rows to the legacy chat-completions endpoint (one-time data migration + migrator special-case) — rejected: it fights the sparse-row delegation design ([Feature]: Reconcile provider-registry connection-config changes into already-persisted user_provider rows #17096, which has a philosophy test asserting registry defaults flow to inherited rows), and the Responses path is the better default for every bot family.
  • Deleting the chat-completions extra_body reasoning/web-search paths (the original shape of this PR) — rejected after the data-driven reasoning refactor landed on main; they now serve as the fallback endpoint's audited contracts.

Links to places where the discussion took place:

Breaking changes

Poe's default chat endpoint moves to openai-responses for fresh and existing installs (sparse rows inherit the registry default; an explicit endpoint choice is preserved). Plain chat, reasoning and web search keep working — reasoning coverage widens from contract-listed families to all bots. Users who want the legacy endpoint can select openai-chat-completions explicitly in Settings → Model Providers → Poe. Recorded (severity: notice) in v2-refactor-temp/docs/breaking-changes/2026-07-13-poe-responses-endpoint-required.md.

Special notes for your reviewer

  • packages/provider-registry/data/*.json are regenerated via pnpm --filter @cherrystudio/provider-registry generate; the diff includes expected upstream (models.dev/OpenRouter) metadata drift per packages/provider-registry/CLAUDE.md. Two pieces of drift needed source fixes (each its own commit): the new ling-3-0-flash-fin model ships reasoning controls, so the bailing creator gains a reasoning-membership rule; and models.dev de-listed Fireworks' accounts/fireworks/routers/* kimi SKUs, so their overrides pin apiModelId/name to stay resolvable as standalone rows.
  • Verified: pnpm test:provider-registry (346/346 incl. catalog-source-sync and the new Poe contract test) and pnpm --filter @cherrystudio/provider-registry compat:check (compatible with frozen registry schema v1).

Checklist

This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

Release note

Poe now defaults to the OpenAI Responses API endpoint, enabling reasoning-effort control for all bots and built-in web search for supported bots.

@kovsu

This comment was marked as outdated.

@kovsu
kovsu requested a review from DeJeune April 9, 2026 09:35
@kovsu
kovsu force-pushed the hotfix/poe-custom-provider branch from 9b7e423 to 0911df1 Compare July 13, 2026 08:15
@kovsu
kovsu requested a review from 0xfullex as a code owner July 13, 2026 08:15
@kovsu
kovsu force-pushed the hotfix/poe-custom-provider branch from 0911df1 to 8cfb7fc Compare July 13, 2026 08:22

@cherry-ai-bot cherry-ai-bot Bot left a comment

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.

Cherry Review · 阻塞

1 blocker
逐条见行内评论。


## What the user should do

Open Settings → Model Providers → Poe and switch the API endpoint to

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.

必须修复:Existing Poe provider rows remain routed through openai-chat-completions, but this PR removes Poe-specific reasoning and web-search handling while documenting a Settings endpoint switch that the UI does not persist for existing providers.

inv_564ed6016e8f062a#c0

@kangfenmao kangfenmao left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

发现一个必须在合并前处理的升级兼容性问题,详见行内评论。

"developerRole": false
},
"defaultChatEndpoint": "openai-chat-completions",
"defaultChatEndpoint": "openai-responses",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[P1] 为现有 Poe provider 行保留/迁移旧端点。PresetProviderSeeder 的 batchUpsertTx 只插入不存在的 providerId,因此已存在的 Poe 行仍为 openai-chat-completions;本 PR 同时移除了 reasoning.ts/websearch.ts 的 Poe 分支,升级用户的 reasoning effort 和 web search 会静默失效。请在升级路径增加一次性迁移或保留兼容分支,并确保 endpoint config/default/model endpoint 一致后再移除旧协议支持。

@kovsu kovsu changed the title feat: poe support responses api feat(poe): default to the openai responses api endpoint Aug 28, 2026
kovsu added 5 commits August 28, 2026 09:13
…rovider

Signed-off-by: Konv Suu <hi@kovsu.com>

# Conflicts:
#	packages/provider-registry/data/models.json
#	packages/provider-registry/data/providers.json
#	packages/provider-registry/src/providers/poe.ts
#	src/main/ai/utils/reasoning.ts
#	src/main/ai/utils/websearch.ts
#	src/renderer/pages/settings/ProviderSettings/providerUrls.ts
models.dev now ships reasoning controls for ling-3-0-flash-fin; the membership invariant requires the owning creator to claim every catalog reasoning model.

Signed-off-by: Konv Suu <hi@kovsu.com>
…breaking

The chat-completions fallback keeps its reasoning contracts and web search, so existing installs lose nothing; only the default for fresh installs changes.

Signed-off-by: Konv Suu <hi@kovsu.com>
models.dev dropped the accounts/fireworks/routers/* kimi SKUs, leaving the source overrides dangling; pin apiModelId and name so they stay resolvable as standalone rows.

Signed-off-by: Konv Suu <hi@kovsu.com>
@kovsu
kovsu force-pushed the hotfix/poe-custom-provider branch from f97cf67 to c188555 Compare August 28, 2026 01:17

@cherry-ai-bot cherry-ai-bot Bot left a comment

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.

Cherry Review · 阻塞

1 blocker
逐条见行内评论。

Comment thread packages/provider-registry/data/provider-models.json
@cherry-ai-bot
cherry-ai-bot Bot dismissed their stale review August 28, 2026 02:12

已有更新的评审结论,撤回这条 REQUEST_CHANGES

kovsu added 3 commits August 28, 2026 11:32
Poe's Responses emulation for Claude (LiteLLM→Vertex) breaks streams, so the
4.5-line official bots join the anthropic-messages pin, using the exact
lowercase bot names api.poe.com/v1/models serves; an explicit-set contract
test locks the full pinned roster. Also pins the Fireworks wire ids that
models.dev de-listed (gpt-oss-20b, minimax-m2p7) so requests keep valid
model paths. Catalog regenerated from source.

Signed-off-by: Konv Suu <hi@kovsu.com>
The manifest embeds the provider catalog content hash; regenerate it against the updated catalog so build:builtin-knowledge:check passes.

Signed-off-by: Konv Suu <hi@kovsu.com>
Sparse provider rows delegate to the registry preset by design (CherryHQ#17096), so the endpoint switch applies to existing installs too; document the real semantics and the explicit-choice escape hatch instead of promising a fresh-install-only change.

Signed-off-by: Konv Suu <hi@kovsu.com>
@kovsu
kovsu requested a review from kangfenmao August 28, 2026 03:37
Signed-off-by: Konv Suu <hi@kovsu.com>

@cherry-ai-bot cherry-ai-bot Bot left a comment

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.

Cherry Review · 通过

1 warning
逐条见行内评论。

{ modelId: 'gpt-oss-120b', values: ['low', 'medium', 'high'] },
{ modelId: 'gpt-oss-20b', values: ['low', 'medium', 'high'] },
{ modelId: 'minimax-m2-7', values: ['low', 'medium', 'high'] },
{ modelId: 'gpt-oss-20b', apiModelId: 'accounts/fireworks/models/gpt-oss-20b', values: ['low', 'medium', 'high'] },

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.

建议修复:The manually pinned Fireworks model overrides omit provider-specific pricing, so regenerated catalog rows lose known Fireworks prices. GPT OSS 20B and MiniMax M2.7 then inherit zero input/output pricing from the global catalog, while the standalone Kimi router rows have no pricing at all.

inv_7806d61e74d9fe01#c0

@cherry-ai-bot
cherry-ai-bot Bot dismissed their stale review August 28, 2026 04:35

已有更新的评审结论,撤回这条 REQUEST_CHANGES

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.

3 participants