🧳 fix: Carry Logical Endpoints Through Agent Runs (#15538)

* fix(agents): preserve logical endpoints in run inputs

* docs(agents): clarify endpoint input compatibility

* chore: update @librechat/agents to version 3.7.19

* refactor(agents): use released endpoint input type
This commit is contained in:
Danny Avila 2026-09-03 11:35:19 -04:00 • committed by GitHub
parent ac55b5fad4
commit 849e9bb40d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 37 additions and 7 deletions

View file

@ -46,7 +46,7 @@
"@azure/storage-blob": "^12.30.0",
"@google/genai": "^2.8.0",
"@keyv/redis": "5.1.6",
"@librechat/agents": "^3.7.17",
"@librechat/agents": "^3.7.19",
"@librechat/api": "*",
"@librechat/data-schemas": "*",
"@microsoft/microsoft-graph-client": "^3.0.7",

10
package-lock.json generated
View file

@ -63,7 +63,7 @@
"@azure/storage-blob": "^12.30.0",
"@google/genai": "^2.8.0",
"@keyv/redis": "5.1.6",
"@librechat/agents": "^3.7.17",
"@librechat/agents": "^3.7.19",
"@librechat/api": "*",
"@librechat/data-schemas": "*",
"@microsoft/microsoft-graph-client": "^3.0.7",
@ -10633,9 +10633,9 @@
}
},
"node_modules/@librechat/agents": {
"version": "3.7.17",
"resolved": "https://registry.npmjs.org/@librechat/agents/-/agents-3.7.17.tgz",
"integrity": "sha512-aJ3beJxbGNMYaXas0F9M5+e+1A8pjS1ND7TZ8EuEx7BwwN/2qqWn10aIG6Fyqcr/0GPOw8kVkz1BGwAraV3UUg==",
"version": "3.7.19",
"resolved": "https://registry.npmjs.org/@librechat/agents/-/agents-3.7.19.tgz",
"integrity": "sha512-/dHHKBvLoXjX1hFkDJBGP5CjkMp1vS+e3OyLqffa4c7JCenFhOHThBDUdZmCDvoEylRhima0h3fYl/JqCR8+hQ==",
"license": "MIT",
"dependencies": {
"@anthropic-ai/sdk": "^0.115.0",
@ -42639,7 +42639,7 @@
"@azure/storage-blob": "^12.30.0",
"@google/genai": "^2.8.0",
"@keyv/redis": "5.1.6",
"@librechat/agents": "^3.7.17",
"@librechat/agents": "^3.7.19",
"@librechat/data-schemas": "*",
"@modelcontextprotocol/sdk": "^1.30.0",
"@opentelemetry/api": "^1.9.0",

View file

@ -113,7 +113,7 @@
"@azure/storage-blob": "^12.30.0",
"@google/genai": "^2.8.0",
"@keyv/redis": "5.1.6",
"@librechat/agents": "^3.7.17",
"@librechat/agents": "^3.7.19",
"@librechat/data-schemas": "*",
"@modelcontextprotocol/sdk": "^1.30.0",
"@opentelemetry/api": "^1.9.0",

View file

@ -323,6 +323,35 @@ afterAll(() => {
delete process.env.TENANT_ISOLATION_STRICT;
});
// ---------------------------------------------------------------------------
// Suite: agent endpoint projection
// ---------------------------------------------------------------------------
describe('agent endpoint projection', () => {
it('preserves each logical endpoint independently from its resolved provider', async () => {
const agents = await callAndCapture({
agents: [
makeAgent({ id: 'sales-copilot', provider: 'bedrock', endpoint: 'bedrock' }),
makeAgent({ id: 'dwaine', provider: 'openAI', endpoint: 'DWAINE' }),
],
});
expect(agents).toEqual(
expect.arrayContaining([
expect.objectContaining({
agentId: 'sales-copilot',
endpoint: 'bedrock',
provider: 'bedrock',
}),
expect.objectContaining({
agentId: 'dwaine',
endpoint: 'DWAINE',
provider: 'openAI',
}),
]),
);
});
});
// ---------------------------------------------------------------------------
// Suite: custom endpoint stream usage defaults
// ---------------------------------------------------------------------------

View file

@ -1770,6 +1770,7 @@ export async function createRun({
const reasoningKey = getReasoningKey(provider, llmConfig, agent.endpoint, agent.reasoningKey);
const agentInput: AgentInputs = {
provider,
endpoint: agent.endpoint ?? provider,
reasoningKey,
toolDefinitions,
agentId: agent.id,