openclaw/patches
Ubuntu 3da4d91ec0 fix: add pnpm patch for pi-ai to support LiteLLM providerType
When using Claude models via LiteLLM proxy, the bundled pi-ai sends
OpenAI-specific parameters (store, max_completion_tokens) that cause
errors with non-OpenAI backends like AWS Bedrock.

This patch adds providerType support to openai-completions.js:
- Check model.providerType to determine if model is OpenAI-native
- Only send OpenAI-specific params to actual OpenAI models
- Use max_tokens instead of max_completion_tokens for proxy models

Users can now configure custom models in ~/.pi/agent/models.json with
providerType: "anthropic" (or "google", etc.) to properly route
requests through LiteLLM to Claude and other non-OpenAI models.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 01:07:57 +00:00
..
@mariozechner__pi-ai.patch fix: add pnpm patch for pi-ai to support LiteLLM providerType 2025-12-08 01:07:57 +00:00