fix: allow empty API key for custom OpenAI-compatible providers by gokay-ai · Pull Request #8944 · janhq/jan · GitHub
Skip to content

fix: allow empty API key for custom OpenAI-compatible providers - #8944

Open
gokay-ai wants to merge 1 commit into
janhq:mainfrom
gokay-ai:cursor/custom-provider-empty-api-key-fc83
Open

gokay-ai wants to merge 1 commit into
janhq:mainfrom
gokay-ai:cursor/custom-provider-empty-api-key-fc83

Conversation

@gokay-ai

Copy link
Copy Markdown
Contributor

Describe Your Changes

You can add a custom OpenAI-compatible provider without an API key. That's the normal setup for local servers like mlx_lm and LM Studio.

Anthropic-compatible providers still require a key, and the base URL still has to be a valid http(s) URL.

Refreshing models on a custom OpenAI-compatible provider also works with an empty key. Built-in remotes (OpenAI, etc.) still need one.

Fixes Issues

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

Local servers like mlx_lm and LM Studio don't need a key. Anthropic-
compatible providers still require one, and the base URL is still
validated.

Fixes janhq#8740
Copilot AI lite review requested due to automatic review settings September 14, 2026 11:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

jamesdam added a commit that referenced this pull request Sep 15, 2026
48071fb parameterized the NSIS template's absolute paths behind a
`jan_workspace` placeholder and taught the internal Windows workflow to
substitute it. The external (fork PR) workflow was never given the same
line, so it feeds NSIS a template with 12 unexpanded placeholders:

    !define INSTALLERICON "jan_workspace\src-tauri\icons\icon.ico"

    Error while loading icon from "jan_workspace\src-tauri\icons\icon.ico":
      can't open file
    Error in script "...\nsis\x64\installer.nsi" on line 279
      -- aborting creation process
    failed to bundle project: `The system cannot find the file specified.`

Every fork PR has failed build-windows-x64-external since 2026-09-04 as a
result; confirmed on two unrelated PRs (#8942, #8944) with byte-identical
output. The ~18 preceding `SignTool Error: No signature found` lines are
unrelated noise from signing unsigned NSIS plugin DLLs -- they are also
present on green internal runs.

The added lines are byte-identical to the internal workflow's, so the two
now agree. Every placeholder the template uses is substituted by both.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

bug: Custom Provider cannot be added without api key

2 participants