Add Abacus vendor for ChatLLM models with static model list #1852
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.
Add Abacus vendor for ChatLLM models with static model list
Summary
This PR adds support for the Abacus AI provider to the OpenAI-compatible plugin, including a new static model list mechanism for providers that don't support dynamic model discovery.
Related Issues
Closes #1800
Files Changed
.vscode/settings.jsoncSpell.wordsarrayinternal/plugins/ai/openai_compatible/providers_config.goAbacusprovider configuration toProviderMapgetStaticModels()method to handle static model listsListModels()method to check for static model list prefix ("static:")fmtpackage import for error formattinginternal/plugins/ai/openai_compatible/providers_config_test.goCode Changes
Static Model List Mechanism
The most significant change is the introduction of a static model list handler in
ListModels():This enables providers to specify a static list of models using a special
static:prefix instead of requiring an API endpoint for model discovery.New getStaticModels Method
A new method was added to retrieve predefined model lists:
Abacus Provider Configuration
Added new provider entry in
ProviderMap:Reason for Changes
The changes were made to:
/modelsendpoint or have non-standard model listing mechanisms. The static model list approach provides a fallback solutionImpact of Changes
Positive Impacts
Potential Issues
Test Plan
providers_config_test.goverifying the Abacus provider exists in the provider mapAdditional Notes
ImplementsResponses: false, which means it follows the legacy response handling approach