Add APIpie provider #89
Open
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.
Summary
Implementation Details
Model Metadata Generation
APIpie's
/v1/models/detailedendpoint returns comprehensive model information but lacks human-readable display names and reasoning effort metadata. This PR addresses these limitations:Display Names: Uses Claude Sonnet 4.5 via APIpie to generate professional display names from model IDs and descriptions
gpt-4o-2024-11-20→"GPT-4o (2024-11-20)"claude-3-5-sonnet→"Claude 3.5 Sonnet"Reasoning Effort Detection: For models with "reasoning" in their subtype, uses LLM to analyze descriptions and determine if they support controllable reasoning depth (e.g., OpenAI's
reasoning_effortparameter)Graceful Fallback
The implementation ensures the tool never breaks due to API issues:
APIPIE_DISPLAY_NAME_API_KEYis not set or fails, falls back to using raw model IDs as display namesCaching Strategy
Implements SQLite-based caching to minimize API costs:
CI/CD Integration
Updates
.github/workflows/update.ymlto:API Key Donation
To enable the enhanced metadata generation features in this PR, the contributor is donating an APIpie API key. The API key will be sent to the Charm Bracelet maintainers via email for configuration in GitHub Actions secrets as
APIPIE_DISPLAY_NAME_API_KEY.