Commit Graph
36 Commits
Author SHA1 Message Date
Patrick Wozniak 4f91a9b00b fix(stream): isolate transport state by credential 2026-08-20 00:13:56 +02:00
Patrick Wozniak 75552ef4b9 test(e2e): add live account profiles 2026-08-18 17:20:44 +02:00
Patrick Wozniak 89dc21bed2 feat(api): fall back for go plan accounts 2026-08-18 12:11:47 +02:00
Patrick Wozniak 864538e146 fix(ci): satisfy provider audit checks 2026-08-18 11:01:12 +02:00
Patrick Wozniak 7af77ddf58 fix(models): refresh expired display pricing 2026-08-18 10:56:11 +02:00
Patrick Wozniak 84a802d91d feat(api): use official provider endpoints 2026-08-18 10:56:06 +02:00
Patrick Wozniak 0603291396 feat(auth): support direct api key login 2026-08-18 10:55:58 +02:00
Patrick WozniakandGitHub a367aed63c feat(models): add vision input capabilities (#43) 2026-08-11 00:28:03 +02:00
Patrick Wozniak ea55ead662 fix(stream): omit prior reasoning from request history 2026-08-07 16:39:18 +02:00
Patrick Wozniak 8541fe109a Merge branch 'feat/model-catalog-runtime' into feat/request-fidelity 2026-08-07 14:37:19 +02:00
Patrick Wozniak c0d126cb73 fix(models): sync reasoning efforts with command code cli 2026-08-07 14:37:04 +02:00
Patrick Wozniak 7efca20d16 fix(core): preserve request fidelity and provider errors 2026-08-07 14:05:03 +02:00
Patrick Wozniak 7e9ecc563a feat(models): add model-aware runtime metadata 2026-08-07 14:03:24 +02:00
Patrick Wozniak 947915df55 fix(models): refresh model pricing 2026-08-04 13:46:26 +02:00
Patrick Wozniak 1579bfd4be fix(deps): use host-provided pi core packages 2026-08-04 02:13:06 +02:00
IfkumRfnl 69ba0da305 fix(stream): correct cached input accounting 2026-08-03 05:49:31 +00:00
Patrick Wozniak b1a60da6b4 fix(models): store cache in agent directory
Resolve the Command Code model cache through the host's getAgentDir helper so pi, OMP, and PI_CODING_AGENT_DIR use their own agent state directory instead of the official Command Code client directory.
2026-08-02 01:37:34 +02:00
Patrick Wozniak 070ef3c07a fix(models): cache catalog for offline startup
Persist the last valid Command Code model catalog and use it when live model discovery fails. Keep first-time offline startup non-fatal, surface clear warnings, and cover cached model selection with unit and pi integration regression tests.
2026-08-02 01:16:39 +02:00
Patrick WozniakandGitHub e123e84116 fix(omp): avoid unsupported calculateCost import
Fix OMP installation by removing the unsupported calculateCost runtime import from pi-ai.
2026-07-05 03:10:02 +02:00
PlumJamandGitHub 88d8706234 fix: resolve deprecation warning for apiKey value
Use the explicit $COMMANDCODE_API_KEY environment variable reference expected by newer pi versions while keeping compatibility with the legacy placeholder handling.
2026-06-16 14:08:11 +02:00
Patrick Wozniak 221677b5ba fix(core): report retry timeouts clearly 2026-06-02 10:30:32 +02:00
jizhejiang 57bcdc7396 fix(core): address PR review on retry defaults and timeouts
Align provider maxRetries default with pi (0), treat maxRetryDelayMs 0 as
no cap, keep per-attempt timeout through stream reads, and fix gitleaks
test fixtures.
2026-06-02 16:15:19 +08:00
jizhejiang c3107dbc1c feat(core): add retry for transient HTTP and stream-level errors
Add retry mechanism driven by pi settings.json retry.provider config
(timeoutMs, maxRetries, maxRetryDelayMs).

HTTP-level retries handle 429/5xx with exponential backoff and jitter,
respecting Retry-After headers (seconds and HTTP-date formats).

Stream-level retries handle cases where the API returns 200 OK but
sends an error event in the stream body. Retries only when no content
has been emitted yet.

Per-attempt timeout via AbortController with automatic retry. Clean
abort propagation through the retry loop.
2026-06-02 11:38:10 +08:00
Patrick Wozniak 17175abd28 Bump CLI version header to 0.29.0 for API parity 2026-05-28 22:50:54 +02:00
Patrick Wozniak fe49146892 Merge remote-tracking branch 'origin/main' into fix/pr-7-review
# Conflicts:
#	index.ts
#	package.json
#	tests/test-pi-local.mjs
2026-05-28 22:07:51 +02:00
Patrick Wozniak 3fba807abf fix(stream): close thinking block before text or tool output
If upstream omits reasoning-end and starts emitting text-delta or
tool-call events, the thinking block remained open causing
thinking_start -> thinking_delta -> text_start -> ... -> thinking_end
ordering. Now endThinking() is called at the start of text-delta and
tool-call handlers so thinking_end always precedes text_start or
toolcall_start.

Adds 2 regression tests for the missing reasoning-end edge case.
2026-05-28 22:05:01 +02:00
wh.huajieyu e78875f532 refactor: clean up code formatting and update package dependencies
- Removed unnecessary blank lines and improved formatting for better readability in index.ts and converters.ts.
- Updated package-lock.json to downgrade several dependencies for compatibility, including @protobufjs/eventemitter, @protobufjs/fetch, and others.
- Enhanced error message in core.ts to clarify configuration options for the Command Code API key.
- Added a test to ensure the correct handling of environment variable values in test-stream.ts.
2026-05-28 06:23:28 -04:00
AlexVagrantandwh.huajieyu c2497ed098 feat: add OMP (Oh My Pi) provider compatibility
Support OMP as a host alongside pi:
- Convert OMP's array-format system prompts to string via systemPromptToText
- Guard against OMP passing the literal env-var name as the API key value
- Add ~/.omp/agent/auth.json to default auth path lookup
- Fix --list-models output to check both stdout and stderr
- Add OMP compatibility smoke test with isolated temp HOME and mock server
- Deduplicate usage section in README, add OMP install and usage docs
2026-05-28 04:12:35 -04:00
Fei Yan 93864879b2 docs: add 0.2.0 changelog entry and pricing section to README
Document the incremental reasoning-delta streaming, live display pricing,
and dynamic model fetch in CHANGELOG.md. Add a Pricing section to
README.md explaining the MODEL_COSTS overlay and how to update prices.
2026-05-27 07:32:50 +08:00
Fei Yan 0d96bf507a docs(changelog): add 0.2.0 entry and pricing section to README
Document the incremental reasoning-delta streaming, live display pricing,
and dynamic model fetch in CHANGELOG.md. Add a Pricing section to
README.md explaining the MODEL_COSTS overlay and how to update prices.
2026-05-27 07:32:43 +08:00
Patrick Wozniak cc05faa526 Release 0.1.1 2026-05-26 23:05:21 +02:00
Patrick Wozniak 418f4c925b Fetch Command Code models at startup 2026-05-26 21:51:41 +02:00
Patrick Wozniak b8853ab0d6 Add Command Code browser login fallback 2026-05-05 14:48:06 +02:00
Patrick Wozniak af2b316d84 style: configure prettier (no semicolons, trailing commas) 2026-05-05 14:02:41 +02:00
Patrick Wozniak e9853eb4a4 chore: add CI workflow (typecheck + prettier format check), tsconfig, and prettier formatting 2026-05-05 13:56:41 +02:00
Patrick Wozniak ebf638e9fb Extract Command Code stream core 2026-05-05 13:22:00 +02:00