Commit Graph
13 Commits
Author SHA1 Message Date
cat-shark a0be14764c feat(models): register every /model/list scenario
Qoder's /model/list groups one account catalog by UI scenario (chat,
assistant, quest, qwork, experts, ...). The CLI only read `chat`, so the
picker hid models the IDE exposes elsewhere — GLM-5.3, GLM-5.2 and
DeepSeek-V4-Pro live under experts/qwork.

Register the union of the scenario groups, keeping the first occurrence per
upstream key (chat wins) and excluding byok_* groups, which are
bring-your-own-key providers rather than part of the shared catalog.

Also keep an explicitly enabled `auto` model: live catalogs key `configs` by
the whitespace-stripped display name, so it arrives as `Auto` instead of the
legacy raw `auto` key.

Refresh the lockfile to the 0.4.5 already in package.json.
2026-09-24 17:17:10 +08:00
Cursor Agent a238e428fe fix: load registerApiProvider dynamically for OMP
OMP rewrites @earendil-works/pi-ai/compat to a bundle without
registerApiProvider, which broke static import at install/load.
Probe the export at runtime; stock pi still registers qoder-api for
global streamSimple, while OMP relies on registerProvider(streamSimple).
2026-09-06 12:53:03 +00:00
Cursor Agent 8dd4cdbefb docs: drop leftover region-env notes from README 2026-08-31 18:15:36 +00:00
Cursor Agent b68cfd3e31 docs: rewrite README for region-bound providers and friendly model IDs 2026-08-31 18:10:47 +00:00
Cursor AgentandSimon Shi 9d88e995ee Refactor provider around fixed regions and friendly model ids
Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 17:11:18 +00:00
Cursor AgentandSimon Shi aaac381d76 refactor: use friendly model ids globally
Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 16:29:52 +00:00
Cursor AgentandSimon Shi 1e44cde685 fix(models): use the 1M context window Qoder actually supports (#13)
auto, efficient and lite carried a 180K contextWindow, so pi showed >100%
context usage and auto-compacted early. Live testing in #13 drove global
lite to 1,000K tokens successfully, so the 180K value was a stale
max_input_tokens floor rather than a real limit.

Introduce DEFAULT_CONTEXT_WINDOW (1M) and use it for the global static
models, including gm51model. Apply it as the catalog fallback too, but only
when /model/list advertises no context_config: models that do advertise a
smaller window (kmodel at 256K, CN GLM-5.2 and MiniMax at 200K) keep it
rather than being inflated to 1M. CN Auto stays at 200K since only global
lite was verified at 1M.

Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 15:57:49 +00:00
het-e2mandGitHub 46bf89a5ac docs: list latest Qoder frontier models
Updated model names and versions in the README.
2026-07-27 14:19:37 +05:30
Simon Shi a98b9573f4 feat: auto-login from Qoder API key 2026-07-20 18:22:35 +08:00
温习江湖andGitHub 2b2f427628 Support Qoder CN (#4)
* feat(qoder-cn): add region endpoints and model catalog

* feat(qoder-cn): add separate provider auth and streaming

* docs: document Qoder CN provider
2026-06-26 14:42:36 +08:00
Simon Shi bcaa66091e fix: route PAT login through pi LoginDialog callbacks
The custom ctx.ui.custom login menu stole focus from pi's built-in
LoginDialog, so onPrompt never received keystrokes and PAT login
silently failed with 'No API key found'. Drive login via the provided
onPrompt/onAuth/onProgress callbacks instead, and drop login-ui.ts and
the now-unused pi-tui dependency. Also clears remaining lint warnings
by removing any-casts in models/oauth/stream/transform.
2026-06-16 13:39:16 +08:00
Simon Shi 842bec6eb2 feat: proper PAT support via job-token exchange
Qoder PATs (pt-...) cannot authenticate directly; they must be exchanged
for a short-lived job token (jt-...), mirroring the official qodercli flow.

- pat.ts: exchangeJobToken + credentialsFromPat (exchange + identity)
- oauth: fix QODER_PERSONAL_ACCESS_TOKEN env path; re-exchange PAT on refresh
- login: add 'Use API Key (PAT)' option to /login menu and terminal fallback
- README: correct PAT docs (exchange required, two entry points)
2026-06-16 13:39:13 +08:00
Simon Shi dd8c313984 feat: init pi-provider-qoder plugin with oauth, signature and WAF bypass 2026-06-16 13:38:48 +08:00