cat-shark d0d69617da fix: keep a turn's tool results together when one returns an image
The OpenAI-shaped `tool` role content is a plain string, so a tool result
carrying images (pi's read/screenshot tools) follows as an extra user
message. It was emitted immediately after its own tool message, which broke
multi-call turns:

  assistant(tool_calls=[a, b]) -> tool(a) -> user(image) -> tool(b)

Qoder rejects that with "An assistant message with 'tool_calls' must be
followed by tool messages responding to each 'tool_call_id' (insufficient
tool messages following tool_calls message)", leaving the session unable to
send any further request.

Queue the image follow-up and flush it once the run of consecutive tool
results ends, so every tool_call_id is answered before the user message.
2026-09-24 17:17:25 +08:00
2026-09-06 12:36:23 +00:00
2026-09-08 17:04:46 +00:00

pi-provider-qoder

A pi extension that connects pi to Qoder.

pi install npm:pi-provider-qoder
# or: omp install npm:pi-provider-qoder
pi --provider qoder --model Lite
pi --provider qoder-cn --model Qwen3.7-Plus

Inside pi:

/login qoder
/model Qwen3.8-Max

Providers

Both providers register together.

qoder (global)

qoder-cn (China)

A PAT (pt-...) is exchanged for a job token. Setting any of those env vars logs the provider in at startup.

Models

Model IDs are the catalog display_name with whitespace stripped. After login, /model lists what that region offers.

Examples: Lite, Qwen3.8-Max, Qwen3.7-Plus, Qwen3.8-Flash.

Qoder's /model/list groups one account catalog by UI scenario (chat, assistant, quest, qwork, experts, …). pi registers the union of those groups, so the picker matches the models your Qoder IDE shows instead of the old chat-only CLI subset (e.g. GLM-5.3, GLM-5.2, DeepSeek-V4-Pro appear only under experts/qwork). Duplicate upstream keys keep the chat entry.

Context uses the largest live catalog option (often 1M). Output is 128K.

Endpoints

Global (qoder) China (qoder-cn)
PAT exchange https://openapi.qoder.sh/api/v1/jobToken/exchange https://openapi.qoder.com.cn/api/v1/jobToken/exchange
User info https://openapi.qoder.sh/api/v1/userinfo https://openapi.qoder.com.cn/api/v1/userinfo
Usage https://openapi.qoder.sh/api/v2/quota/usage https://openapi.qoder.com.cn/api/v2/quota/usage
Chat gateway https://api3.qoder.sh/ https://gateway.qoder.com.cn/

License

MIT

S
Description
No description provided
Readme
387 KiB
Languages
TypeScript 100%