refactor: Update BaseClient to handle non-ephemeral agents in conversation logic

- Added a check for non-ephemeral agents in BaseClient, modifying the exceptions set to include 'model' when applicable.
- Enhanced conversation handling to improve flexibility based on agent type.
This commit is contained in:
Danny Avila 2025-12-12 20:45:03 -05:00
parent 12584e42b3
commit 6738acbe04
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956

View file

@ -966,6 +966,11 @@ class BaseClient {
const unsetFields = {};
const exceptions = new Set(['spec', 'iconURL']);
const hasNonEphemeralAgent =
endpointOptions?.agent_id && endpointOptions.agent_id !== Constants.EPHEMERAL_AGENT_ID;
if (hasNonEphemeralAgent) {
exceptions.add('model');
}
if (existingConvo != null) {
this.fetchedConvo = true;
for (const key in existingConvo) {