Skip to content

feat: allow custom model User-Agent overrides#239

Closed
hanzheng1954 wants to merge 1 commit into
boldsoftware:mainfrom
hanzheng1954:feature/custom-model-user-agent
Closed

feat: allow custom model User-Agent overrides#239
hanzheng1954 wants to merge 1 commit into
boldsoftware:mainfrom
hanzheng1954:feature/custom-model-user-agent

Conversation

@hanzheng1954

Copy link
Copy Markdown

Summary

  • add an optional per-custom-model user_agent setting
  • persist it in SQLite and expose it through custom model CRUD/test APIs
  • apply the override through the shared LLM HTTP transport
  • add React and Vue model-form fields
  • preserve Shelley's default Shelley/<commit> User-Agent when unset

Motivation

Some OpenAI-compatible providers restrict channels by client User-Agent. Custom models currently cannot use those providers because Shelley always overwrites User-Agent.

Validation

  • go test ./llm/llmhttp ./db ./models ./server
  • pnpm run type-check
  • pnpm run lint
  • pnpm run build
  • live test through /api/custom-models-test: default Shelley UA was rejected with 403; configured custom UA succeeded

Full go test ./... still has pre-existing unrelated failures on current main in Anthropic metadata/tool-schema tests, plus templates must be generated before cmd/templates compilation.

@cla-bot

cla-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: exe.dev user.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@hanzheng1954
hanzheng1954 force-pushed the feature/custom-model-user-agent branch from 31bb426 to e399aff Compare July 15, 2026 15:13
@cla-bot

cla-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: exe.dev user.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

Co-authored-by: Shelley <shelley@exe.dev>
@hanzheng1954
hanzheng1954 force-pushed the feature/custom-model-user-agent branch from e399aff to 9c46200 Compare July 15, 2026 17:15
@cla-bot

cla-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have you on file. In order for us to review and merge your code, please contact @crawshaw at david@bold.dev to get yourself added.

@philz

philz commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Thanks for the contribution. This currently seems pretty niche to me. I'd recommend you run a proxy locally instead. If you let me know what providers you're running into issues with, happy to reconsider.

@philz philz closed this Jul 15, 2026
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