🦙 fix: Memory Agent Fails to Initialize with Ollama Provider (#11680)

Fixed an issue where memory agents would fail with 'Provider Ollama not supported'
error when using Ollama as a custom endpoint. The getCustomEndpointConfig function
was only normalizing the endpoint config name but not the endpoint parameter
during comparison.

Changes:
- Modified getCustomEndpointConfig to normalize both sides of the endpoint comparison
- Added comprehensive test coverage for getCustomEndpointConfig including:
  - Test for case-insensitive Ollama endpoint matching (main fix)
  - Tests for various edge cases and error handling

This ensures that endpoint name matching works correctly for Ollama regardless
of case sensitivity in the configuration.
This commit is contained in:
Callum Keogan 2026-02-13 15:43:25 +00:00 committed by GitHub
parent 2e42378b16
commit 8e3b717e99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 76 additions and 4 deletions

View file

@ -64,7 +64,7 @@ export const getCustomEndpointConfig = ({
const customEndpoints = appConfig.endpoints?.[EModelEndpoint.custom] ?? [];
return customEndpoints.find(
(endpointConfig) => normalizeEndpointName(endpointConfig.name) === endpoint,
(endpointConfig) => normalizeEndpointName(endpointConfig.name) === normalizeEndpointName(endpoint),
);
};