Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e8f1606
fix: forward modelLabel to AgentClient so it reaches the model
AyushCipher Aug 29, 2026
d102c24
Merge branch 'main' into fix/modelspec-modellabel-context
AyushCipher Aug 30, 2026
abf95df
Merge branch 'main' into fix/modelspec-modellabel-context
AyushCipher Aug 31, 2026
d8cdf1d
Merge branch 'main' into fix/modelspec-modellabel-context
AyushCipher Aug 31, 2026
d633934
Merge branch 'dev' into fix/modelspec-modellabel-context
AyushCipher Sep 1, 2026
233c5de
Merge branch 'dev' into fix/modelspec-modellabel-context
AyushCipher Sep 1, 2026
8d749d8
Merge branch 'dev' into fix/modelspec-modellabel-context
AyushCipher Sep 2, 2026
4a55562
Merge branch 'dev' into fix/modelspec-modellabel-context
AyushCipher Sep 2, 2026
5149533
Merge branch 'dev' into fix/modelspec-modellabel-context
AyushCipher Sep 2, 2026
652cbb5
Merge branch 'dev' into fix/modelspec-modellabel-context
AyushCipher Sep 3, 2026
5386cb7
Merge branch 'dev' into fix/modelspec-modellabel-context
AyushCipher Sep 4, 2026
e1de68a
Merge branch 'dev' into fix/modelspec-modellabel-context
AyushCipher Sep 4, 2026
5af12a3
Merge branch 'dev' into fix/modelspec-modellabel-context
AyushCipher Sep 4, 2026
34d5084
Merge branch 'dev' into fix/modelspec-modellabel-context
AyushCipher Sep 4, 2026
6e9c757
Merge branch 'dev' into fix/modelspec-modellabel-context
AyushCipher Sep 5, 2026
3a2fd8b
Merge branch 'dev' into fix/modelspec-modellabel-context
AyushCipher Sep 5, 2026
12f130f
Merge branch 'dev' into fix/modelspec-modellabel-context
AyushCipher Sep 7, 2026
895a09c
Merge branch 'dev' into fix/modelspec-modellabel-context
AyushCipher Sep 8, 2026
c1ae75e
Merge branch 'dev' into fix/modelspec-modellabel-context
AyushCipher Sep 9, 2026
062d466
Merge branch 'dev' into fix/modelspec-modellabel-context
AyushCipher Sep 10, 2026
52b0657
Merge branch 'dev' into fix/modelspec-modellabel-context
AyushCipher Sep 11, 2026
d4d12b7
Merge branch 'dev' into fix/modelspec-modellabel-context
AyushCipher Sep 12, 2026
c1bd63a
Merge branch 'dev' into fix/modelspec-modellabel-context
AyushCipher Sep 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions api/server/services/Endpoints/agents/initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -1507,6 +1507,10 @@ const initializeClient = async ({
spec: endpointOption.spec,
iconURL: endpointOption.iconURL,
chatProjectId: endpointOption.chatProjectId,
/** Forwarded so `formatMessage` can set it as the assistant `name` on
* outgoing messages (making it visible to the model, not just the UI)
* and so it round-trips into `getSaveOptions`. */
modelLabel: endpointOption.model_parameters.modelLabel,
attachments: primaryConfig.requestAttachments ?? primaryConfig.attachments,
agentContextAttachmentsByAgentId,
endpointType: endpointOption.endpointType,
Expand Down
33 changes: 33 additions & 0 deletions api/server/services/Endpoints/agents/initialize.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,39 @@ describe('initializeClient — processAgent ACL gate', () => {
},
});

it('forwards a custom endpoint model spec preset modelLabel to the AgentClient so it reaches the model-visible context', async () => {
const ephemeralId = 'openRouter__deepseek-v4-flash';
mockInitializeAgent.mockResolvedValue({
...makePrimaryConfig([]),
id: ephemeralId,
endpoint: 'openRouter',
});

const endpointOption = {
...makeEndpointOption(),
endpoint: 'openRouter',
agent: Promise.resolve({
id: ephemeralId,
provider: 'openRouter',
model: 'deepseek/deepseek-v4-flash',
tools: [],
}),
model_parameters: {
model: 'deepseek/deepseek-v4-flash',
modelLabel: 'DeepSeek V4 Flash',
},
};

await initializeClient({
req: makeReq(),
res: {},
signal: new AbortController().signal,
endpointOption,
});

expect(agentClientArgs.modelLabel).toBe('DeepSeek V4 Flash');
});

it('replaces untrusted artifact route metadata with the executing agent context', async () => {
mockInitializeAgent.mockResolvedValue(makePrimaryConfig([]));

Expand Down