Skip to content

feat: add user agent pass-through settings#1231

Merged
looplj merged 5 commits intolooplj:release/v0.9.xfrom
djdembeck:feat/user-agent-passthrough-clean
Apr 1, 2026
Merged

feat: add user agent pass-through settings#1231
looplj merged 5 commits intolooplj:release/v0.9.xfrom
djdembeck:feat/user-agent-passthrough-clean

Conversation

@djdembeck
Copy link
Copy Markdown
Contributor

Clean implementation of user agent pass-through settings for channels.

Replaces #1204 which had Git contamination issues.

Changes

  • Add user agent pass-through configuration options
  • Allow channels to forward original client user agent to upstream providers

…ponents

- Add system-wide User-Agent pass-through settings with UI in general-settings component.
- Implement User-Agent header pass-through for channel LLM requests via orchestrator middleware.
- Update LLM HTTP client to respect channel-level User-Agent pass-through settings with fallback to global settings.
- Enhance channels-action-dialog with user agent configuration support.
- Add GraphQL resolvers and schema for UserAgentPassThroughSettings management.
- Add comprehensive test coverage for system settings and orchestrator overrides.
…gh was enabled initially

- Set AxonHub default User-Agent when pass-through is disabled instead of leaving it empty.
- Update test to expect AxonHub default User-Agent when pass-through is disabled.
… update flow

- Created conditional proxy config based on proxyType supporting disabled, environment, and URL modes.
- Applied mergeChannelSettingsForUpdate to sync proxy config and passThroughUserAgent with existing settings.
- Updated update mutation flow to include nextSettings instead of undefined.
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a User-Agent Pass-Through feature, enabling the forwarding of original client User-Agent headers to upstream AI providers via global system settings or channel-level overrides. The implementation includes frontend UI components, GraphQL schema updates, and a new orchestrator middleware. Feedback identifies logic issues where the pass-through mechanism could overwrite custom header overrides, suggests simplifying the HTTP client model by removing redundant fields, and points out minor indentation errors in the frontend code.

…ducing redundant proxy config

- Pass settings from currentRow to edit route values for proper initialization.
- Remove redundant proxy config object from mergeChannelSettingsForUpdate call.
@djdembeck djdembeck marked this pull request as draft March 31, 2026 23:57
…A handling logic

- Removed PassThroughUserAgent boolean field from Request struct in model.go.
- Simplified BuildHttpRequest to only set default User-Agent when header is empty.
- Removed pass-through field assignments from orchestrator middleware (override.go).
- Updated test cases to remove expectations for the removed field.
- Fixed error handling in GeneralSettings component with proper state reversion.
@djdembeck djdembeck marked this pull request as ready for review April 1, 2026 00:12
@djdembeck
Copy link
Copy Markdown
Contributor Author

tested and working. Tried combinations of channel-specific setting on/off+global setting on/off.

@looplj
Copy link
Copy Markdown
Owner

looplj commented Apr 1, 2026

Just confirm, the system will pass-through user-agent by default.

Will this pr break the default behavior.

@djdembeck
Copy link
Copy Markdown
Contributor Author

Just confirm, the system will pass-through user-agent by default.

Will this pr break the default behavior.

No, the PR keeps the default behavior unchanged: By default, the axonhub user-agent is sent upstream to API endpoints, and the user has to enable user-agent pass-through.

@looplj looplj merged commit d540c8e into looplj:release/v0.9.x Apr 1, 2026
2 checks passed
@djdembeck djdembeck deleted the feat/user-agent-passthrough-clean branch April 1, 2026 06:06
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