Validate and compose provider endpoints
This commit is contained in:
10
types.go
10
types.go
@@ -297,7 +297,8 @@ type ExecutionTarget struct {
|
||||
// empty for endpoint-only profiles. It is supplied to injected LLMClient
|
||||
// implementations as part of the effective target.
|
||||
BackendID string `json:"backend_id,omitempty"`
|
||||
// Endpoint is the model-provider base URL.
|
||||
// Endpoint is the normalized absolute HTTP or HTTPS model-provider base URL.
|
||||
// It has a host and no user information, query, or fragment.
|
||||
Endpoint string `json:"endpoint"`
|
||||
// Model is the provider model identifier.
|
||||
Model string `json:"model"`
|
||||
@@ -396,7 +397,9 @@ type PromptInspection struct {
|
||||
// framework deadline when no higher-precedence value is present.
|
||||
type ExecutionTargetOverride struct {
|
||||
// Endpoint replaces the profile or backend endpoint when non-empty without
|
||||
// changing the effective BackendID.
|
||||
// changing the effective BackendID. Preparation trims it and requires an
|
||||
// absolute HTTP or HTTPS URL with a host and no user information, query, or
|
||||
// fragment.
|
||||
Endpoint string
|
||||
// Model replaces the profile model when non-empty.
|
||||
Model string
|
||||
@@ -457,7 +460,8 @@ type Profile struct {
|
||||
BackendID string
|
||||
// Endpoint is the model-provider base URL. It is required only when
|
||||
// BackendID is blank and otherwise overrides the backend endpoint when
|
||||
// non-blank.
|
||||
// non-blank. WithProfiles trims it and requires an absolute HTTP or HTTPS URL
|
||||
// with a host and no user information, query, or fragment.
|
||||
Endpoint string
|
||||
// Model is the required non-blank provider model identifier.
|
||||
Model string
|
||||
|
||||
Reference in New Issue
Block a user