From 8dd4cdbefb54bf932a780400f77e1c35f76e353d Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 31 Aug 2026 18:15:36 +0000 Subject: [PATCH] docs: drop leftover region-env notes from README --- README.md | 70 +++++++------------------------------------------------ 1 file changed, 8 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index 0d83da9..5ca3784 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,6 @@ A [pi](https://shittycodingagent.ai/) extension that connects pi to Qoder. pi install npm:pi-provider-qoder ``` -The published package ships `dist/index.js` via `pi.extensions`. - -Log in, then pick a provider and a model: - ```bash pi --provider qoder --model Lite pi --provider qoder-cn --model Qwen3.7-Plus @@ -24,58 +20,31 @@ Inside pi: ## Providers -Both providers are always registered together. Each is bound to one region at -registration. There is no `QODER_REGION`, `QODER_BACKEND`, or `QODER_MODE`, and -those cannot reroute `qoder` to China. Use `--provider qoder-cn` instead. +Both providers register together. ### `qoder` (global) -- Always `https://api3.qoder.sh/` +- `https://api3.qoder.sh/` - Login: `/login qoder` (browser OAuth or PAT) - PAT page: https://qoder.com/account/integrations - Env (first match): `QODER_API_KEY`, `QODER_PERSONAL_ACCESS_TOKEN`, `QODER_PAT` ### `qoder-cn` (China) -- Always `https://gateway.qoder.com.cn/` -- Login: `/login qoder-cn` (PAT only; no browser login) +- `https://gateway.qoder.com.cn/` +- Login: `/login qoder-cn` (PAT only) - PAT page: https://qoder.com.cn/account/integrations - Env (first match): `QODERCN_API_KEY`, `QODERCN_PERSONAL_ACCESS_TOKEN`, `QODERCN_PAT` -A PAT (`pt-...`) is exchanged for a short-lived job token (same as qodercli) and -re-exchanged when it expires. Setting any of the env vars above logs that -provider in automatically at startup. +A PAT (`pt-...`) is exchanged for a job token. Setting any of those env vars logs the provider in at startup. ## Models -Public model IDs are friendly names only: the catalog `display_name` with -whitespace stripped. After login, the live `/algo/api/v2/model/list` catalog -replaces the static fallback. Run `/model` to see what the region actually -offers. +Model IDs are the catalog `display_name` with whitespace stripped. After login, `/model` lists what that region offers. -Do not treat the static seeds as the live list; they go stale. Live CN currently -includes models such as Qwen3.8-Flash and Qwen3.7-Flash that the static catalog -may omit, and still lists some models that are gone live. +Examples: `Lite`, `Qwen3.8-Max`, `Qwen3.7-Plus`, `Qwen3.8-Flash`. -Examples (not exhaustive): - -- Global `qoder`: `Lite`, `Qwen3.8-Max`, `Qwen3.7-Plus` -- China `qoder-cn`: `Qwen3.8-Flash`, `Qwen3.7-Plus` - -Requests still send the internal upstream key (`lite`, `qfmodel`, …), but those -keys are not public IDs. `--model qfmodel` fails with `Unknown Qoder model id`. -`--model lite` as a raw key also fails; it can still work only because pi -case-insensitively matches the friendly id `Lite`. - -Context window uses the largest option the live catalog advertises (often 1M). -Output is capped at 128K tokens. - -## 0.4 breaking changes - -- Model IDs are friendly names only. Raw upstream keys are not public IDs. -- Providers are region-bound: `qoder` is always global, `qoder-cn` is always CN. - `QODER_REGION` is gone. -- The published extension entry is `dist/index.js` (fixes npm packages that pointed at src). +Context uses the largest live catalog option (often 1M). Output is 128K. ## Endpoints @@ -86,29 +55,6 @@ Output is capped at 128K tokens. | 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/` | -## Architecture - -```text -src/ -├── index.ts # Register both providers -├── region.ts # Fixed global/CN URLs and env names -├── catalog.ts # Friendly IDs, live catalog cache, static seeds -├── cosy.ts # Internal request signing -├── auth/ -│ ├── pat.ts # PAT → job-token exchange -│ ├── login.ts # Browser/PAT login -│ ├── oauth.ts # Credentials, refresh, env auto-login -│ └── usage.ts # Quota reporting -└── protocol/ - ├── stream.ts # Streaming request/response - ├── transform.ts # Message conversion - ├── encoding.ts # Internal body encoding - └── thinking.ts # Thinking-tag parser -``` - -COSY signing and WAF body encoding are internal request plumbing, not -user-facing features. - ## License MIT