Implementation of choosing between OPENAI/Antropic models by setting MODEL_TO_USE #144
+335
−232
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.
This pull request introduces enhancements to model selection and logging, along with improvements in API behavior and frontend handling. Key updates include the addition of model aliasing, default model configuration, refined logging for better traceability, and adjustments to frontend model handling logic.
Backend Enhancements
Model Selection and Aliasing:
MODEL_NAME_ALIASES
to map short model names to their full names and ensure consistency in model resolution. Default model selection now usesconfig.MODEL_TO_USE
if no model is specified in requests (backend/agent/api.py
). [1] [2] [3]Logging Improvements:
backend/agent/api.py
,backend/services/llm.py
). [1] [2]Tool Configuration:
run_agent
andthread_manager
functions (backend/agent/run.py
,backend/agentpress/thread_manager.py
). [1] [2]Frontend Enhancements
Model Handling in Chat Input:
ChatInput
component to handle models more flexibly. TheselectedModel
state now defaults tonull
, andmodel_name
is only included in API calls if explicitly selected (frontend/src/components/thread/chat-input.tsx
). [1] [2]… parameters