docs: update memory pages for custom endpoints PR (#488)

This commit is contained in:
Dustin Healy
2026-01-13 08:47:39 -08:00
committed by GitHub
parent 53dfd1141b
commit 872279c4e6
2 changed files with 78 additions and 1 deletions

View File

@@ -160,7 +160,7 @@ When using custom agent configuration, the following fields are available:
**provider** (required)
<OptionTable
options={[
['provider', 'String', 'Specifies the AI provider for the memory agent (e.g., "openAI", "anthropic", "google").', 'provider: "openAI"'],
['provider', 'String', 'Specifies the AI provider for the memory agent. Can be a built-in provider (e.g., "openAI", "anthropic", "google") or a custom endpoint name.', 'provider: "openAI"'],
]}
/>
@@ -221,6 +221,41 @@ memory:
frequency_penalty: 0.1
```
## Using Custom Endpoints
The memory feature supports custom endpoints. When using a custom endpoint, the `provider` field should match the custom endpoint's `name` exactly. Custom headers with environment variables and user placeholders are properly resolved.
```yaml filename="librechat.yaml with custom endpoint for memory"
endpoints:
custom:
- name: 'Custom Memory Endpoint'
apiKey: 'dummy'
baseURL: 'https://api.gateway.ai/v1'
headers:
x-gateway-api-key: '${GATEWAY_API_KEY}'
x-gateway-virtual-key: '${GATEWAY_OPENAI_VIRTUAL_KEY}'
X-User-Identifier: '{{LIBRECHAT_USER_EMAIL}}'
X-Application-Identifier: 'LibreChat - Test'
api-key: '${TEST_CUSTOM_API_KEY}'
models:
default:
- 'gpt-4o-mini'
- 'gpt-4o'
fetch: false
memory:
disabled: false
tokenLimit: 3000
personalize: true
messageWindowSize: 10
agent:
provider: 'Custom Memory Endpoint'
model: 'gpt-4o-mini'
```
- See [Custom Endpoint Headers](/docs/configuration/librechat_yaml/object_structure/custom_endpoint#headers) for all available placeholders
## Notes
- Memory functionality enhances conversation continuity and personalization

View File

@@ -154,6 +154,41 @@ memory:
id: "memory-specialist-001"
```
### Custom Endpoints with Memory
Memory fully supports custom endpoints, including those with custom headers and environment variables. When using a custom endpoint, header placeholders and environment variables are properly resolved during memory processing.
```yaml filename="librechat.yaml with custom endpoint for memory"
endpoints:
custom:
- name: 'Custom Memory Endpoint'
apiKey: 'dummy'
baseURL: 'https://api.gateway.ai/v1'
headers:
x-gateway-api-key: '${GATEWAY_API_KEY}'
x-gateway-virtual-key: '${GATEWAY_OPENAI_VIRTUAL_KEY}'
X-User-Identifier: '{{LIBRECHAT_USER_EMAIL}}'
X-Application-Identifier: 'LibreChat - Test'
api-key: '${TEST_CUSTOM_API_KEY}'
models:
default:
- 'gpt-4o-mini'
- 'gpt-4o'
fetch: false
memory:
disabled: false
tokenLimit: 3000
personalize: true
messageWindowSize: 10
agent:
provider: 'Custom Memory Endpoint'
model: 'gpt-4o-mini'
```
- All [custom endpoint headers](/docs/configuration/librechat_yaml/object_structure/custom_endpoint#headers) are supported
## Troubleshooting
### Memory Not Working
@@ -161,6 +196,7 @@ memory:
2. Check that `disabled` is set to `false`
3. Ensure the configured agent/model is available
4. Verify users have enabled memory in their chat interface
5. For custom endpoints: ensure the `provider` name matches the custom endpoint `name` exactly
### High Token Usage
1. Reduce `tokenLimit` to control costs
@@ -174,6 +210,12 @@ memory:
3. Ensure consistent agent configuration
4. Review stored memory for conflicts
### Custom Endpoint Authentication Issues
1. Verify environment variables are set correctly in your `.env` file
2. Ensure custom headers use the correct syntax (`${ENV_VAR}` for environment variables, `{{LIBRECHAT_USER_*}}` for user placeholders)
3. Check that the custom endpoint is working for regular chat completions before testing with memory
4. Review server logs for authentication errors from the custom endpoint API
## Related Features
- [Agents](/docs/features/agents) - Build custom AI assistants