Add multi-provider feature parity improvements inspired by pi-mono#9
Open
vijaysharm wants to merge 1 commit into
Open
Add multi-provider feature parity improvements inspired by pi-mono#9vijaysharm wants to merge 1 commit into
vijaysharm wants to merge 1 commit into
Conversation
- Add OpenAIChatCompletionsProvider for /v1/chat/completions API, unlocking Groq, Together, xAI, OpenRouter, Mistral, Ollama, and other compatible endpoints - Add OpenAICompletionsCompat flags to handle provider-specific quirks (maxTokensField, supportsDeveloperRole, requiresToolResultName, etc.) - Add ConversationTransformer for cross-provider message normalization: tool call ID sanitization (Anthropic 64-char, Mistral 9-char limits), orphaned tool call repair, and empty message stripping - Add CacheRetention enum and prompt caching support in LLMRequestOptions, with Anthropic cache_control implementation - Extend TokenUsage with cacheReadTokens/cacheWriteTokens and add estimatedCost() for dollar cost calculation from token rates - Add ReasoningEffort.max for maximum reasoning budget (adaptive thinking for Claude 4.x models, 32k budget for Gemini) - Add ServiceTier enum (auto/flex/priority) for OpenAI tiered pricing - Update all existing providers (OpenAI, Anthropic, Gemini, ClaudeCode) to handle new ReasoningEffort.max case and service tier parameter https://claude.ai/code/session_012D8VW6xmUwXbdzA4cDjffP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Groq, Together, xAI, OpenRouter, Mistral, Ollama, and other compatible endpoints
(maxTokensField, supportsDeveloperRole, requiresToolResultName, etc.)
tool call ID sanitization (Anthropic 64-char, Mistral 9-char limits),
orphaned tool call repair, and empty message stripping
with Anthropic cache_control implementation
estimatedCost() for dollar cost calculation from token rates
for Claude 4.x models, 32k budget for Gemini)
to handle new ReasoningEffort.max case and service tier parameter
https://claude.ai/code/session_012D8VW6xmUwXbdzA4cDjffP