Commit Graph
185 Commits
Author SHA1 Message Date
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 96c452eefd chore: upgrade pi dependencies from @mariozechner 0.72.0 to @earendil-works 0.75.5
pi 0.75.5 renamed the npm namespace from @mariozechner/ to @earendil-works/.
Importing from the old namespace causes 'fetch failed' errors at startup.

Changes:
- index.ts: @mariozechner/pi-ai → @earendil-works/pi-ai
- index.ts: @mariozechner/pi-coding-agent → @earendil-works/pi-coding-agent
- package.json: bump deps from 0.72.0 to 0.75.5
- package-lock.json: regenerated with new packages (242 deps)
- tsc --noEmit: zero errors
2026-05-27 19:48:55 +08: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 e8f7410a0a test(pricing): verify MODEL_COSTS entries and promotional notes
Add tests/test-pricing.ts to assert that known models have non-zero
pricing, promotional deals are documented in comments, and Claude models
include cache pricing. Fix test-pi-local to match against combined
stdout+stderr since pi may output model listing to either stream.
2026-05-27 07:32:50 +08:00
Fei Yan 567e1e28a4 feat(models): add live display pricing for known Command Code models
The Provider API does not expose pricing yet. Overlay a static MODEL_COSTS
map on top of the dynamically fetched model list so pi can display per-model
costs. Models not in the table fall back to zero cost. When the Provider API
adds a cost field, the static table can be removed.
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 b850558199 docs(contributing): add contribution and release guides 2026-05-26 23:26:52 +02:00
Patrick Wozniak cc05faa526 Release 0.1.1 2026-05-26 23:05:21 +02:00
Patrick WozniakandGitHub 5d4277876b Merge pull request #4 from ninehills/main
Update Command Code model discovery.

Closes #3.
2026-05-26 21:52:58 +02:00
Patrick Wozniak 5714e3863a Test dynamic Command Code model discovery 2026-05-26 21:51:54 +02:00
Patrick Wozniak 418f4c925b Fetch Command Code models at startup 2026-05-26 21:51:41 +02:00
Tao Yang 960d0d1f23 feat: extract models from command-code dist, load via models.json
- Add scripts/extract-models.ts to parse command-code npm dist file
- Generate models.json (21 models, 15 pricing entries) with contextWindow
  and maxOutputTokens pre-filled; no nulls or hardcoded fallbacks in index.ts
- Rewrite index.ts to load model list and costs from models.json
- Cap gateway model maxOutputTokens at 65536 (API limit for Baseten/Vercel)
- Add 'Update models' section to README documenting the generation flow
- Add npm run extract-models script
2026-05-25 16:37:08 +08:00
Patrick WozniakandGitHub b5b109c63c Update README.md 2026-05-05 14:58:48 +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 be6d17ea56 docs: add disclaimer, 4x DeepSeek V4 offer, and DeepSeek V4 model 2026-05-05 13:40:04 +02:00
Patrick Wozniak 66c695bfff fix: include src/ in npm publish files 2026-05-05 13:31:06 +02:00
Patrick Wozniak e283cd0677 chore: add README, LICENSE, publish workflow, and npm metadata for pi.dev/packages 2026-05-05 13:29:46 +02:00
Patrick Wozniak 3630b85298 Add pi CLI coverage with DeepSeek 2026-05-05 13:22:15 +02:00
Patrick Wozniak 145e2678b6 Test real Command Code core behavior 2026-05-05 13:22:05 +02:00
Patrick Wozniak ebf638e9fb Extract Command Code stream core 2026-05-05 13:22:00 +02:00
Patrick Wozniak b8b0a9894e chore: add npm test scripts and finalize package metadata 2025-05-05 11:50:00 +02:00
Patrick Wozniak 4407ab5b37 fix: add onResponse hook for response metadata inspection before streaming 2025-05-05 11:20:00 +02:00
Patrick Wozniak 29f4565a53 fix: flush remaining thinking blocks after stream ends 2025-05-05 10:45:00 +02:00
Patrick Wozniak 38deb03c6c test: add comprehensive stream integration tests (35+ cases) 2025-05-05 10:05:00 +02:00
Patrick Wozniak a4f7d5fda0 chore: add smoke test script for print + RPC mode validation 2025-05-04 20:00:00 +02:00
Patrick Wozniak b13da480fa test: add abort integration tests with mock HTTP server 2025-05-04 19:45:00 +02:00
Patrick Wozniak 2af822e79f test: add pure function unit tests (toJsonSchema, messagesToCC, toolsToJson, textContent) 2025-05-04 19:10:00 +02:00
Patrick Wozniak 103b6e6fff feat: add abort handling with raceAbort helper 2025-05-04 18:40:00 +02:00
Patrick Wozniak 0cb34f54d7 feat: add API key resolution from env var + auth.json files 2025-05-04 18:15:00 +02:00
Patrick Wozniak 28ccca9a0c feat: implement streamCommandCode with SSE parsing 2025-05-04 17:50:00 +02:00
Patrick Wozniak ad3479f68c feat: add model definitions and helpers (toJsonSchema, toolsToJson, messagesToCC) 2025-05-04 17:22:00 +02:00
Patrick Wozniak d18dd3e77b feat: scaffold pi package with provider skeleton 2025-05-04 17:05:00 +02:00