Skip to content

feat(gateway): keep driver and agent model options up to date + add modelgateway#9

Merged
Kylejeong2 merged 3 commits intomainfrom
kylejeong/gro-1192-keep-driver-and-agent-model-options-up-to-date
Apr 8, 2026
Merged

feat(gateway): keep driver and agent model options up to date + add modelgateway#9
Kylejeong2 merged 3 commits intomainfrom
kylejeong/gro-1192-keep-driver-and-agent-model-options-up-to-date

Conversation

@Kylejeong2
Copy link
Copy Markdown
Member

Summary

  • Add modelSource toggle (gateway vs own key) for flexible model routing
  • Fix agentExecute body: model is now a flat string, removed provider/cua/apiKey from body
  • Remove apiKey from sessions/start body; auth is header-only via x-bb-api-key
  • Make modelApiKey optional in credentials; only send x-model-api-key header in own key mode
  • Only send x-bb-project-id header when non-empty
  • Update model list to latest versions (Claude 4.6, Gemini 3)
  • Default all model selectors to anthropic/claude-sonnet-4-6
  • Tag all sessions with n8n metadata

- Add modelSource toggle (gateway vs own key) for flexible model routing
- Fix agentExecute body: model is now a flat string, removed provider/cua/apiKey from body
- Remove apiKey from sessions/start body; auth is header-only via x-bb-api-key
- Make modelApiKey optional in credentials; only send x-model-api-key header in own key mode
- Only send x-bb-project-id header when non-empty
- Update model list to latest versions (Claude 4.6, Gemini 3)
- Default all model selectors to anthropic/claude-sonnet-4-6
- Tag all sessions with n8n metadata
Copy link
Copy Markdown

@shrey150 shrey150 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving to unblock, but would consider:

  • renaming "own key" -> "user provided key" (both on name and value)
  • removing all logic for project ID

if (modelApiKey) {
headers['x-model-api-key'] = modelApiKey as string;
}
const projectId = (browserbaseProjectId as string)?.trim();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we need to keep this header around? Should we remove since it's basically a no-op?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as to not break any potential existing n8n workflows, addressed again below as well

},
{
name: 'Own API Key',
value: 'ownKey',
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts on renaming to User-provided API key & value: 'userProvidedKey' for clarity?

{
displayName: 'Model Info',
name: 'modelNotice',
name: 'modelNoticeByok',
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason you renamed here? assuming this is Byok = Bring Your Own Key? in this case, let's make it modelNoticeBYOK? but again, not sure if we need the rename

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the info is different based on whether or not you use the gateway

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can change to uppercase

}
headers['x-model-api-key'] = modelApiKey;
}
const projectId = (credentials.browserbaseProjectId as string)?.trim();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again wondering if we need project ID at all

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

projectId is optional, i have it here still since if you use the old credential setup/want to pass projectId to scope it you can but it's not required/shown that its not required when you setup your creds.

@Kylejeong2 Kylejeong2 merged commit 7c856b8 into main Apr 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants