Commit Graph

4 Commits

  • docs: Update project description with AI package information
    - Added @mariozechner/pi-ai package to the structure
    - Updated features to include unified LLM API
    - Expanded supported providers list
    - Updated tech stack with multiple SDKs
    - Added architecture details for AI package
    - Updated version numbers to current 0.5.12
    - Added testing information for AI package (Vitest)
    - Included all packages in build order example
  • feat(ai): Create unified AI package with OpenAI, Anthropic, and Gemini support
    - Set up @mariozechner/ai package structure following monorepo patterns
    - Install OpenAI, Anthropic, and Google Gemini SDK dependencies
    - Document comprehensive API investigation for all three providers
    - Design minimal unified API with streaming-first architecture
    - Add models.dev integration for pricing and capabilities
    - Implement automatic caching strategy for all providers
    - Update project documentation with package creation guide
  • 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.
  • 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