Skip to content

fix(core): normalize model base URL to origin#119

Merged
XXPermanentXX merged 1 commit into
mainfrom
fix/base-url-origin-only
Jul 23, 2026
Merged

fix(core): normalize model base URL to origin#119
XXPermanentXX merged 1 commit into
mainfrom
fix/base-url-origin-only

Conversation

@XXPermanentXX

Copy link
Copy Markdown
Collaborator

Summary

  • normalize model-service Base URLs to their URL origin
  • remove all user-provided path, query, and fragment components while preserving explicit ports
  • update config, resolver, persistence, UI, and E2E expectations
  • keep bl config agent provider Base URL behavior unchanged

Why

Users may copy a model-specific endpoint such as https://example.com/api/v1/agentstudio and provide it as base_url. The previous suffix-based normalization preserved unknown paths, so the CLI could append its own endpoint path to an already specific API path.

The model-domain base_url contract is now unambiguous: it is the service origin, and CLI commands append their own API paths.

Impact

https://example.com/api/v1/agentstudio now normalizes to https://example.com. Path-mounted gateway prefixes are no longer retained. URLs with explicit ports, such as http://localhost:8080/path, normalize to http://localhost:8080.

Validation

  • vp test run packages/core/tests/model-base-url.test.ts packages/core/tests/config-store.test.ts packages/core/tests/config-priority.test.ts packages/core/tests/index.test.ts packages/commands/tests/config-ui.test.ts packages/commands/tests/e2e/config.e2e.test.ts — 87 tests passed
  • vp check — formatting, lint, and type checks passed
  • pre-commit skill reference generation and checks passed

@XXPermanentXX
XXPermanentXX merged commit f9012a6 into main Jul 23, 2026
2 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

Development

Successfully merging this pull request may close these issues.

1 participant