Skip to content

fix: use matching Undici fetch for private AI providers - #1309

Merged
ZacharyZcR merged 1 commit into
Termix-SSH:dev-2.8.0from
singhangadin:fix/ollama-private-provider-fetch
Aug 23, 2026
Merged

fix: use matching Undici fetch for private AI providers#1309
ZacharyZcR merged 1 commit into
Termix-SSH:dev-2.8.0from
singhangadin:fix/ollama-private-provider-fetch

Conversation

@singhangadin

@singhangadin singhangadin commented Aug 23, 2026

Copy link
Copy Markdown

Overview

Fix allowlisted private AI providers failing with fetch failed when Termix runs with a different bundled Undici version than its installed undici package.

  • Fixed: Private AI provider requests now use the installed Undici fetch implementation with its matching dispatcher.
  • Added: Regression coverage for the private-provider request path.

Changes Made

  • Route allowlisted private provider requests through the existing fetchWithProxy helper.
  • Preserve proxy handling and the existing private-endpoint allowlist checks.
  • Avoid passing an Undici 8 dispatcher to Node's bundled Undici 7 fetch, which fails with UND_ERR_INVALID_ARG: invalid onRequestStart method.

Related Issues

Screenshots / Demos

  • I tested this fix successfully on my self-hosted Termix 2.7.1 Docker deployment with Ollama on an allowlisted private endpoint. Model discovery and streamed chat both work after the fix.

Testing

  • 26 focused backend tests passed.
  • TypeScript project check passed.
  • ESLint passed for the changed files.

Checklist

  • Code follows project style guidelines
  • Supports mobile and desktop UI/app (not applicable; backend-only change)
  • I have read Contributing.md
  • This is not a translation request. See docs

@ZacharyZcR
ZacharyZcR changed the base branch from main to dev-2.8.0 August 23, 2026 20:23
@ZacharyZcR ZacharyZcR closed this Aug 23, 2026
@ZacharyZcR ZacharyZcR reopened this Aug 23, 2026

@ZacharyZcR ZacharyZcR left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

改动范围聚焦,已在 dev-2.8.0 上复核;完整 CI 与数据库方言测试均通过。

@ZacharyZcR
ZacharyZcR merged commit 2675781 into Termix-SSH:dev-2.8.0 Aug 23, 2026
3 checks 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

2 participants