Skip to content

Conversation

@peterschmidt85
Copy link
Contributor

@peterschmidt85 peterschmidt85 commented Feb 10, 2026

Summary

Migrate service.model.base_url from the deprecated gateway.{domain} model aggregation endpoint to the service endpoint for openai-format models.

  • service.model.base_url: For openai format, set to service_url + prefix (e.g. https://run-name.domain.com/v1). For other formats, keep the existing gateway.{domain} URL.
  • Default probe URL: Derive from model's prefix field instead of hardcoding /v1.
  • CORS on gateway service endpoints: Add CORS support (preflight handling + response headers) to the service.jinja2 nginx template, enabled only for services with openai-format models. Strips upstream CORS headers to avoid duplicates.
  • cors_enabled on Service model: Store CORS flag per-service for correctness with multiple services. Includes a startup migration for gateways with pre-existing state.

peterschmidt85 and others added 5 commits February 10, 2026 11:53
…/v1`) if `model` has `openai` format.

- Add CORS support to the gateway service endppoint (if `model` has `openai` format)
… backward compatibility (with older verions of gateway)
Now that service.model.base_url points to service.url + /v1 for
openai-format models, it is no longer deprecated and can be recommended
as the model endpoint.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@peterschmidt85 peterschmidt85 marked this pull request as ready for review February 10, 2026 12:23
Copy link
Collaborator

@Bihan Bihan left a comment

Choose a reason for hiding this comment

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

These changes do not affect SGLang router–based services, before or after PR

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