35 Commits
Author SHA1 Message Date
Cursor Agent 6ac304c9f9 chore: bump version to 0.4.5 2026-09-08 17:04:46 +00: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 ab80759fe0 chore: bump version to 0.4.3 2026-09-06 12:37:37 +00:00
Cursor Agent dfe7308674 chore: refresh package dependencies 2026-09-06 12:36:23 +00:00
Cursor Agent 3d0c18f88b test: isolate oauth PAT env from host QODER_API_KEY 2026-09-06 10:09:04 +00:00
Cursor Agent 8a2a9b2481 perf: cut hot-path body copies, Cosy hashing, and per-request disk reads 2026-09-06 10:07:32 +00:00
Cursor Agent b854aa4685 chore: bump version to 0.4.2 2026-09-06 09:51:20 +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 Agent bd3d020cee fix: register qoder-api for pi global streamSimple
Pi 0.84+ no longer registers custom APIs from registerProvider.streamSimple,
so a later agent-loop path threw No API provider registered for api: qoder-api.
2026-08-31 17:51:46 +00:00
Cursor AgentandSimon Shi 09bd3bcf07 chore: bump version to 0.4.0
Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 17:23:32 +00:00
Cursor AgentandSimon Shi fb7305b0f8 chore: refresh npm lockfile
Refresh lockfile and dependencies within existing ranges via npm update.

Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 17:23:18 +00:00
Cursor AgentandSimon Shi dc8b9afad2 Require friendly names for live catalog models
Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 17:12:20 +00:00
Cursor AgentandSimon Shi 10ab666f31 Use friendly CN model in region binding test
Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 17:11:58 +00:00
Cursor AgentandSimon Shi 11249d12c4 Format reorganized provider modules
Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 17:11:43 +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 63c517002e Fix provider binding test mocks
Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 16:53:00 +00:00
Cursor AgentandSimon Shi 66f950f9c5 Bind Qoder providers to fixed regions
Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 16:51:59 +00:00
Cursor AgentandSimon Shi b1d66d6eb4 fix: unblock live fixture recording
Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 16:33:47 +00:00
Cursor AgentandSimon Shi 72a81d672f test: cover live chat endpoint classification
Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 16:33:24 +00:00
Cursor AgentandSimon Shi 476a466076 style: format stream adapter test
Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 16:32:09 +00:00
Cursor AgentandSimon Shi b4f504094e refactor: centralize regional provider configuration
Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 16:31:54 +00:00
Cursor AgentandSimon Shi 9dc71be404 fix: correct friendly model table typing
Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 16:30:15 +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 ca17a95270 test: correct fixture and abort harness
Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 16:28:09 +00:00
Cursor AgentandSimon Shi 3d7df5d1e4 test: cover provider adapter scenarios
Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 16:27:32 +00:00
Cursor AgentandSimon Shi 6d5cdfd171 test: add redacted Qoder protocol recorder and replays
Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 16:14:37 +00:00
Cursor AgentandSimon Shi 1eee02455c fix: bump COSY client identity to qodercli 1.1.38
Older Cosy-Version / cosyVersion values cause the model catalog and
gateway to treat the client as a stale qodercli and return a reduced
list. Align QoderIDEVersion with current CLI 1.1.38.

Leave PAT exchange and userinfo Cosy-Version at 1.0.1: those openapi
endpoints do not use a COSY signature, and I could not verify that
official qodercli 1.1.38 changed them.

Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 16:07:41 +00:00
Cursor AgentandSimon Shi e7b5990e5c ci: build and test on Node 24
@earendil-works/pi-coding-agent, pi-ai and the undici they pull in all
declare engines node >=22.19.0, so CI's Node 20 was below the floor: the
newly added test step failed loading pi-coding-agent with
"webidl.util.markAsUncloneable is not a function". Release already
publishes on Node 24.

Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 15:59:37 +00:00
Cursor AgentandSimon Shi 2d9e31ea4a ci: run the test suite
CI linted, typechecked and built but never ran vitest, so the suite could
break on main without anyone noticing.

Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 15:58:00 +00:00
Cursor AgentandSimon Shi 52f7752717 test: guard the published pi.extensions entry (#18, #21)
The npm tarball ships only dist/ and README.md, so the pi.extensions
"./src/index.ts" that shipped in 0.3.0 left Pi listing the package as
installed while never loading the provider. main already points at
./dist/index.js (6d9635e), but nothing stopped it regressing again -- it
had already flipped once in 1b110a6.

Assert the entry is ./dist/index.js and, more generally, that every
pi.extensions path falls inside the published files set.

Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 15:57:56 +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
Cursor AgentandSimon Shi 1dd1b0988b test: isolate suites from the real ~/.pi and from each other
Several suites read and write ~/.pi/agent/{auth,qoder-models-cache}.json.
Vitest runs files in parallel, so one file could truncate a file another
was reading, and a run also clobbered the developer's own ~/.pi state.
Give each test file its own HOME.

Isolation exposed a latent coupling in the stream suite: with no resolved
identity on disk, streamQoder fetches /userinfo first and consumes the
single mocked Response, so the chat read failed on a locked stream. The
suite only passed because another file left credentials behind. Stub the
identity so the mock only ever serves the chat request.

Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 15:57:41 +00:00
Cursor AgentandSimon Shi e98526a8cd fix(types): restore npm run check
pi-coding-agent 0.84 no longer exports AuthStorage, so the named import
failed to compile even though the call site already guarded for its
absence. Read it off the module namespace instead, keeping the auth-file
fallback when the export is missing.

Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 15:57:26 +00:00
Cursor AgentandSimon Shi 70fba627e6 fix(lint): clear biome errors breaking CI on main
CI was red at the lint step: an unused providerID parameter in
createQoderOAuth, an unused getCachedCredentials import in stream.ts,
plus unsorted imports and stale formatting in stream.ts and pat.ts.

Co-authored-by: Simon Shi <simonsmh@users.noreply.github.com>
2026-08-31 15:57:20 +00:00