Commit graph

1166 commits

Author SHA1 Message Date
Mario Zechner
f82e82da93 docs: Improve reasoning support table clarity
- Remove redundant 'Reasoning Tokens' column (all models count them)
- Group by provider for better readability
- Clarify model limitations vs API limitations
- Simplify check marks to focus on thinking content availability
2025-08-10 02:13:13 +02:00
Mario Zechner
047d9af407 docs: Fix outdated Gemini thinking content notes
Gemini 2.5 thinking content IS fully supported - we handle extra_body automatically
2025-08-10 01:56:20 +02:00
Mario Zechner
99ce76d66e feat(agent): Comprehensive reasoning token support across providers
Added provider-specific reasoning/thinking token support for:
- OpenAI (o1, o3, gpt-5): Full reasoning events via Responses API, token counts via Chat Completions
- Groq: reasoning_format:"parsed" for Chat Completions, no summary support for Responses
- Gemini 2.5: extra_body.google.thinking_config with <thought> tag extraction
- OpenRouter: Unified reasoning parameter with message.reasoning field
- Anthropic: Limited support via OpenAI compatibility layer

Key improvements:
- Centralized provider detection based on baseURL
- parseReasoningFromMessage() extracts provider-specific reasoning content
- adjustRequestForProvider() handles provider-specific request modifications
- Smart reasoning support detection with caching per API type
- Comprehensive README documentation with provider support matrix

Fixes reasoning tokens not appearing for GPT-5 and other reasoning models.
2025-08-10 01:46:15 +02:00
Mario Zechner
62d9eefc2a agent: Add reasoning token support for OpenAI reasoning models
- Extract and display reasoning tokens from both Chat Completions and Responses APIs
- Add smart preflight detection to check reasoning support per model/API (cached per agent)
- Support both reasoning_text (o1/o3) and summary_text (gpt-5) formats
- Display reasoning tokens with  symbol in console and TUI renderers
- Only send reasoning parameters to models that support them
- Fix event type from "thinking" to "reasoning" for consistency

Note: Chat Completions API only returns reasoning token counts, not content (by design).
Only Responses API exposes actual thinking/reasoning events.
2025-08-10 00:32:30 +02:00
Mario Zechner
9157411034 Updated agent README.md with test advise 2025-08-09 21:17:46 +02:00
Mario Zechner
832b20b173 v0.5.7: Fix tool counter spacing in metrics display 2025-08-09 20:19:04 +02:00
Mario Zechner
9fee306075 v0.5.6: Fix CLI execution when installed globally 2025-08-09 20:16:59 +02:00
Mario Zechner
db86195dd9 v0.5.5: Add tool call metrics display 2025-08-09 20:11:06 +02:00
Mario Zechner
9544a8edf9 Display tool call metrics: Add ⚒ counter to token usage display
- Show tool call count alongside token metrics in TUI and console renderers
- TUI: Display at bottom with format "↑X ↓Y ⚒Z"
- Console: Show metrics after assistant messages complete
- Counter increments on each tool_call event
2025-08-09 20:10:15 +02:00
Mario Zechner
1887e33339 v0.5.4 - Fix CLI execution when imported and JSON import issues 2025-08-09 19:38:00 +02:00
Mario Zechner
f579a3f112 v0.5.4 - Fix lockstep versioning and update all packages 2025-08-09 19:37:12 +02:00
Mario Zechner
3a9c3a2ed6 v0.5.3 - Fix missing scripts directory in published package 2025-08-09 19:26:59 +02:00
Mario Zechner
42dc46a513 Fix process.cwd() error when running from deleted directory
- Defer process.cwd() call in logger to avoid initialization errors
- Resolve log file path only when actually writing logs
- Bump version to 0.5.2
2025-08-09 18:05:28 +02:00
Mario Zechner
d304f377d7 Fix pi-agent CLI execution issue when installed globally
- Remove isMainModule check that was preventing execution via npm symlink
- CLI now runs main function directly when executed
- Bump version to 0.5.1
2025-08-09 18:02:34 +02:00
Mario Zechner
c615f3f011 Fix npm publishing warnings and clean up package.json files
- Fixed repository URLs to use git+https:// format
- Removed tsconfig.tsbuildinfo from clean scripts
- Updated README with clearer build instructions and dependency order
- Fixed bin paths to reference dist/cli.js correctly
- Ready for npm publishing with no warnings
2025-08-09 17:27:16 +02:00
Mario Zechner
a74c5da112 Initial monorepo setup with npm workspaces and dual TypeScript configuration
- Set up npm workspaces for three packages: pi-tui, pi-agent, and pi (pods)
- Implemented dual TypeScript configuration:
  - Root tsconfig.json with path mappings for development and type checking
  - Package-specific tsconfig.build.json for clean production builds
- Configured lockstep versioning with sync script for inter-package dependencies
- Added comprehensive documentation for development and publishing workflows
- All packages at version 0.5.0 ready for npm publishing
2025-08-09 17:18:38 +02:00