Skip to content

[Refactor] Reuse shared OpenAI-compatible connection helpers in the worker#579

Merged
mrubens merged 1 commit into
developfrom
refactor/reuse-openai-compatible-helpers-35oy31loegy7w
Jul 19, 2026
Merged

[Refactor] Reuse shared OpenAI-compatible connection helpers in the worker#579
mrubens merged 1 commit into
developfrom
refactor/reuse-openai-compatible-helpers-35oy31loegy7w

Conversation

@roomote-roomote

Copy link
Copy Markdown
Contributor

Created by Roomote. Follow up by mentioning @roomote-roomote or in the web UI.

Related issue

Internal maintenance follow-up to multi named OpenAI-compatible connections (related #572 / #562 / #571).

Why this PR exists

  • A maintainer explicitly invited this PR in the linked issue or discussion
  • I am a maintainer / this is internal Roomote work

What changed

Worker OpenCode config generation no longer invents its own OpenAI-compatible provider id and env-var naming for named connections. Discovery and naming now go through the shared @roomote/types helpers, while ollama/vllm/litellm and the default openai-compatible entry stay on an explicit static runtime catalog.

Why this change was made

After multiple named OpenAI-compatible connections shipped, the worker still had a second, looser parsing path. That could drift from the validated types helpers on env names and invalid segments. One ownership path removes that maintenance risk without changing intended provider behavior.

Impact

No intentional user-facing behavior change. Named and default OpenAI-compatible connections still resolve base URL, optional API key, no OPENAI_* fallback, and gateway rebase the same way; invalid env segments now follow the shared validation rules. Tests cover company-proxy/local named configs, invalid segment rejection, and no OpenAI credential leakage.

How it was tested

  • pnpm exec dotenvx run -f .env.test -- pnpm --filter @roomote/worker exec vitest run src/run-task/agent-home.test.ts (26 passed)
  • pnpm --filter @roomote/worker check-types

Checklist

  • The PR title follows the repo convention: [Fix], [Feat], [Improve], [Refactor], [Docs], or [Chore] followed by a user-facing description
  • This PR is small and scoped to one change
  • pnpm lint and pnpm check-types pass locally
  • I added tests or included a clear manual validation note above
  • I removed secrets, tokens, private keys, and customer data from code, logs, and screenshots
  • If this change should appear in the changelog, I ran pnpm changeset

Point worker named connection discovery at @roomote/types helpers so
id and env naming stay a single source of truth.
@roomote-roomote

roomote-roomote Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor Author

No code issues found. See task

Reviewed ca86835

@mrubens
mrubens marked this pull request as ready for review July 19, 2026 13:39
@mrubens
mrubens merged commit 6c62f5e into develop Jul 19, 2026
18 checks passed
@mrubens
mrubens deleted the refactor/reuse-openai-compatible-helpers-35oy31loegy7w branch July 19, 2026 13:39
@roomote-roomote roomote-roomote Bot mentioned this pull request Jul 19, 2026
8 tasks
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