Documentation
¶
Index ¶
- type APIError
- type BadGateway
- type BadGatewayResponseError
- type BadGatewayType
- type BadRequestResponseError
- type BatchErrorResponse
- type BatchPaymentRequiredResponseError
- type Conflict
- type ConflictResponseError
- type ConflictType
- type CreatePrivateEndpointValidationFailedResponseError
- type EdgeNetworkTimeoutResponseError
- type ForbiddenResponseError
- type GatewayTimeoutResponseError
- type GoneResponseError
- type InternChatErrorResponse
- type InternLifecycleError
- type InternalServerError
- type InternalServerErrorType
- type InternalServerResponseError
- type NotFound
- type NotFoundResponseError
- type NotFoundType
- type OAuthErrorResponse
- type PayloadTooLargeResponseError
- type PaymentRequiredResponseError
- type ProviderOverloadedResponseError
- type RequestTimeoutResponseError
- type ServiceUnavailableResponseError
- type TooManyRequestsResponseError
- type UnauthorizedResponseError
- type UnprocessableEntity
- type UnprocessableEntityResponseError
- type UnprocessableEntityType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
func NewAPIError ¶
type BadGateway ¶ added in v0.9.0
type BadGateway struct {
CreatePrivateEndpointValidationFailedResponseError *CreatePrivateEndpointValidationFailedResponseError `queryParam:"inline" union:"member"`
BadGatewayResponseError *BadGatewayResponseError `queryParam:"inline" union:"member"`
Type BadGatewayType
}
BadGateway - An upstream dependency failed. When `activate` was passed and the draft was created, `data` carries it and any validation checks.
func CreateBadGatewayBadGatewayResponseError ¶ added in v0.9.0
func CreateBadGatewayBadGatewayResponseError(badGatewayResponseError BadGatewayResponseError) BadGateway
func CreateBadGatewayCreatePrivateEndpointValidationFailedResponseError ¶ added in v0.9.0
func CreateBadGatewayCreatePrivateEndpointValidationFailedResponseError(createPrivateEndpointValidationFailedResponseError CreatePrivateEndpointValidationFailedResponseError) BadGateway
func (BadGateway) Error ¶ added in v0.9.0
func (u BadGateway) Error() string
func (BadGateway) MarshalJSON ¶ added in v0.9.0
func (u BadGateway) MarshalJSON() ([]byte, error)
func (*BadGateway) UnmarshalJSON ¶ added in v0.9.0
func (u *BadGateway) UnmarshalJSON(data []byte) error
type BadGatewayResponseError ¶
type BadGatewayResponseError struct {
// Error data for BadGatewayResponse
Error_ components.BadGatewayResponseErrorData `json:"error"`
OpenrouterMetadata map[string]any `json:"openrouter_metadata,omitzero"`
UserID *string `json:"user_id,omitzero"`
}
BadGatewayResponseError - Bad Gateway - Provider/upstream API failure
func (*BadGatewayResponseError) Error ¶
func (e *BadGatewayResponseError) Error() string
type BadGatewayType ¶ added in v0.9.0
type BadGatewayType string
const ( BadGatewayTypeCreatePrivateEndpointValidationFailedResponseError BadGatewayType = "CreatePrivateEndpointValidationFailedResponse_error" BadGatewayTypeBadGatewayResponseError BadGatewayType = "BadGatewayResponse_error" )
type BadRequestResponseError ¶
type BadRequestResponseError struct {
// Error data for BadRequestResponse
Error_ components.BadRequestResponseErrorData `json:"error"`
OpenrouterMetadata map[string]any `json:"openrouter_metadata,omitzero"`
UserID *string `json:"user_id,omitzero"`
}
BadRequestResponseError - Bad Request - Invalid request parameters or malformed input
func (*BadRequestResponseError) Error ¶
func (e *BadRequestResponseError) Error() string
type BatchErrorResponse ¶ added in v0.8.29
type BatchErrorResponse struct {
Error_ components.BatchErrorResponseError `json:"error"`
}
func (*BatchErrorResponse) Error ¶ added in v0.8.29
func (e *BatchErrorResponse) Error() string
type BatchPaymentRequiredResponseError ¶ added in v0.8.29
type BatchPaymentRequiredResponseError struct {
CompletionWindow components.BatchPaymentRequiredResponseCompletionWindow `json:"completion_window"`
CreatedAt int64 `json:"created_at"`
Endpoint string `json:"endpoint"`
Error_ components.BatchPaymentRequiredResponseError `json:"error"`
FinalizedAt *int64 `json:"finalized_at"`
ID string `json:"id"`
Model string `json:"model"`
Object components.BatchPaymentRequiredResponseObject `json:"object"`
RequestCounts components.BatchPaymentRequiredResponseRequestCounts `json:"request_counts"`
// Always null: results are withheld until the batch charge is covered.
Results any `json:"results"`
Status components.BatchPaymentRequiredResponseStatus `json:"status"`
Usage *components.BatchPaymentRequiredResponseUsage `json:"usage"`
}
BatchPaymentRequiredResponseError - Batch metadata with results withheld (results: null) plus the standard error envelope. Add credits to unlock the already-computed results; the batch is not re-run.
func (*BatchPaymentRequiredResponseError) Error ¶ added in v0.8.29
func (e *BatchPaymentRequiredResponseError) Error() string
type Conflict ¶ added in v0.9.0
type Conflict struct {
CreatePrivateEndpointValidationFailedResponseError *CreatePrivateEndpointValidationFailedResponseError `queryParam:"inline" union:"member"`
ConflictResponseError *ConflictResponseError `queryParam:"inline" union:"member"`
Type ConflictType
}
Conflict - The request conflicts with the endpoint state, such as a stale validation. When `activate` was passed and the draft was created, `data` carries it and any validation checks.
func CreateConflictConflictResponseError ¶ added in v0.9.0
func CreateConflictConflictResponseError(conflictResponseError ConflictResponseError) Conflict
func CreateConflictCreatePrivateEndpointValidationFailedResponseError ¶ added in v0.9.0
func CreateConflictCreatePrivateEndpointValidationFailedResponseError(createPrivateEndpointValidationFailedResponseError CreatePrivateEndpointValidationFailedResponseError) Conflict
func (Conflict) MarshalJSON ¶ added in v0.9.0
func (*Conflict) UnmarshalJSON ¶ added in v0.9.0
type ConflictResponseError ¶
type ConflictResponseError struct {
// Error data for ConflictResponse
Error_ components.ConflictResponseErrorData `json:"error"`
OpenrouterMetadata map[string]any `json:"openrouter_metadata,omitzero"`
UserID *string `json:"user_id,omitzero"`
}
ConflictResponseError - Conflict - Resource conflict or concurrent modification
func (*ConflictResponseError) Error ¶
func (e *ConflictResponseError) Error() string
type ConflictType ¶ added in v0.9.0
type ConflictType string
const ( ConflictTypeCreatePrivateEndpointValidationFailedResponseError ConflictType = "CreatePrivateEndpointValidationFailedResponse_error" ConflictTypeConflictResponseError ConflictType = "ConflictResponse_error" )
type CreatePrivateEndpointValidationFailedResponseError ¶ added in v0.9.0
type CreatePrivateEndpointValidationFailedResponseError struct {
Data components.CreatePrivateEndpointValidationFailedResponseData `json:"data"`
Error_ components.CreatePrivateEndpointValidationFailedResponseError `json:"error"`
}
func (*CreatePrivateEndpointValidationFailedResponseError) Error ¶ added in v0.9.0
func (e *CreatePrivateEndpointValidationFailedResponseError) Error() string
type EdgeNetworkTimeoutResponseError ¶
type EdgeNetworkTimeoutResponseError struct {
// Error data for EdgeNetworkTimeoutResponse
Error_ components.EdgeNetworkTimeoutResponseErrorData `json:"error"`
OpenrouterMetadata map[string]any `json:"openrouter_metadata,omitzero"`
UserID *string `json:"user_id,omitzero"`
}
EdgeNetworkTimeoutResponseError - Infrastructure Timeout - Provider request timed out at edge network
func (*EdgeNetworkTimeoutResponseError) Error ¶
func (e *EdgeNetworkTimeoutResponseError) Error() string
type ForbiddenResponseError ¶
type ForbiddenResponseError struct {
// Error data for ForbiddenResponse
Error_ components.ForbiddenResponseErrorData `json:"error"`
OpenrouterMetadata map[string]any `json:"openrouter_metadata,omitzero"`
UserID *string `json:"user_id,omitzero"`
}
ForbiddenResponseError - Forbidden - Authentication successful but insufficient permissions
func (*ForbiddenResponseError) Error ¶
func (e *ForbiddenResponseError) Error() string
type GatewayTimeoutResponseError ¶ added in v0.7.141
type GatewayTimeoutResponseError struct {
// Error data for GatewayTimeoutResponse
Error_ components.GatewayTimeoutResponseErrorData `json:"error"`
OpenrouterMetadata map[string]any `json:"openrouter_metadata,omitzero"`
UserID *string `json:"user_id,omitzero"`
}
GatewayTimeoutResponseError - Gateway Timeout - Provider did not respond before the upstream deadline
func (*GatewayTimeoutResponseError) Error ¶ added in v0.7.141
func (e *GatewayTimeoutResponseError) Error() string
type GoneResponseError ¶ added in v0.7.133
type GoneResponseError struct {
// Error data for GoneResponse
Error_ components.GoneResponseErrorData `json:"error"`
OpenrouterMetadata map[string]any `json:"openrouter_metadata,omitzero"`
UserID *string `json:"user_id,omitzero"`
}
GoneResponseError - Gone - Endpoint has been permanently removed or deprecated
func (*GoneResponseError) Error ¶ added in v0.7.133
func (e *GoneResponseError) Error() string
type InternChatErrorResponse ¶ added in v0.7.150
type InternChatErrorResponse struct {
// The OpenAI-compatible error object. `metadata` is present on refusals from the chat route. Authentication refusals (`401`), the departed-creator `403` and the programme `404` carry only `code` and `message`.
Error_ components.InternChatError `json:"error"`
}
InternChatErrorResponse - A refusal before the stream opens. Once the response is `200` and streaming, failures arrive as a chunk with `finish_reason: "error"` instead.
func (*InternChatErrorResponse) Error ¶ added in v0.7.150
func (e *InternChatErrorResponse) Error() string
type InternLifecycleError ¶ added in v0.7.148
type InternLifecycleError struct {
Error_ components.InternLifecycleErrorError `json:"error"`
}
InternLifecycleError - Intern lifecycle request failure.
func (*InternLifecycleError) Error ¶ added in v0.7.148
func (e *InternLifecycleError) Error() string
type InternalServerError ¶ added in v0.9.0
type InternalServerError struct {
CreatePrivateEndpointValidationFailedResponseError *CreatePrivateEndpointValidationFailedResponseError `queryParam:"inline" union:"member"`
InternalServerResponseError *InternalServerResponseError `queryParam:"inline" union:"member"`
Type InternalServerErrorType
}
InternalServerError - Internal server error. When `activate` was passed and the draft was created, `data` carries it and any validation checks.
func CreateInternalServerErrorCreatePrivateEndpointValidationFailedResponseError ¶ added in v0.9.0
func CreateInternalServerErrorCreatePrivateEndpointValidationFailedResponseError(createPrivateEndpointValidationFailedResponseError CreatePrivateEndpointValidationFailedResponseError) InternalServerError
func CreateInternalServerErrorInternalServerResponseError ¶ added in v0.9.0
func CreateInternalServerErrorInternalServerResponseError(internalServerResponseError InternalServerResponseError) InternalServerError
func (InternalServerError) Error ¶ added in v0.9.0
func (u InternalServerError) Error() string
func (InternalServerError) MarshalJSON ¶ added in v0.9.0
func (u InternalServerError) MarshalJSON() ([]byte, error)
func (*InternalServerError) UnmarshalJSON ¶ added in v0.9.0
func (u *InternalServerError) UnmarshalJSON(data []byte) error
type InternalServerErrorType ¶ added in v0.9.0
type InternalServerErrorType string
const ( InternalServerErrorTypeCreatePrivateEndpointValidationFailedResponseError InternalServerErrorType = "CreatePrivateEndpointValidationFailedResponse_error" InternalServerErrorTypeInternalServerResponseError InternalServerErrorType = "InternalServerResponse_error" )
type InternalServerResponseError ¶
type InternalServerResponseError struct {
// Error data for InternalServerResponse
Error_ components.InternalServerResponseErrorData `json:"error"`
OpenrouterMetadata map[string]any `json:"openrouter_metadata,omitzero"`
UserID *string `json:"user_id,omitzero"`
}
InternalServerResponseError - Internal Server Error - Unexpected server error
func (*InternalServerResponseError) Error ¶
func (e *InternalServerResponseError) Error() string
type NotFound ¶ added in v0.9.0
type NotFound struct {
CreatePrivateEndpointValidationFailedResponseError *CreatePrivateEndpointValidationFailedResponseError `queryParam:"inline" union:"member"`
NotFoundResponseError *NotFoundResponseError `queryParam:"inline" union:"member"`
Type NotFoundType
}
NotFound - The model, provider, or validation workspace was not found. When `activate` was passed and the draft was created, `data` carries it and any validation checks.
func CreateNotFoundCreatePrivateEndpointValidationFailedResponseError ¶ added in v0.9.0
func CreateNotFoundCreatePrivateEndpointValidationFailedResponseError(createPrivateEndpointValidationFailedResponseError CreatePrivateEndpointValidationFailedResponseError) NotFound
func CreateNotFoundNotFoundResponseError ¶ added in v0.9.0
func CreateNotFoundNotFoundResponseError(notFoundResponseError NotFoundResponseError) NotFound
func (NotFound) MarshalJSON ¶ added in v0.9.0
func (*NotFound) UnmarshalJSON ¶ added in v0.9.0
type NotFoundResponseError ¶
type NotFoundResponseError struct {
// Error data for NotFoundResponse
Error_ components.NotFoundResponseErrorData `json:"error"`
OpenrouterMetadata map[string]any `json:"openrouter_metadata,omitzero"`
UserID *string `json:"user_id,omitzero"`
}
NotFoundResponseError - Not Found - Resource does not exist
func (*NotFoundResponseError) Error ¶
func (e *NotFoundResponseError) Error() string
type NotFoundType ¶ added in v0.9.0
type NotFoundType string
const ( NotFoundTypeCreatePrivateEndpointValidationFailedResponseError NotFoundType = "CreatePrivateEndpointValidationFailedResponse_error" NotFoundTypeNotFoundResponseError NotFoundType = "NotFoundResponse_error" )
type OAuthErrorResponse ¶ added in v0.7.112
type OAuthErrorResponse struct {
Error_ components.ErrorEnum `json:"error"`
ErrorDescription string `json:"error_description"`
}
OAuthErrorResponse - RFC 6749 §5.2 error response.
func (*OAuthErrorResponse) Error ¶ added in v0.7.112
func (e *OAuthErrorResponse) Error() string
type PayloadTooLargeResponseError ¶
type PayloadTooLargeResponseError struct {
// Error data for PayloadTooLargeResponse
Error_ components.PayloadTooLargeResponseErrorData `json:"error"`
OpenrouterMetadata map[string]any `json:"openrouter_metadata,omitzero"`
UserID *string `json:"user_id,omitzero"`
}
PayloadTooLargeResponseError - Payload Too Large - Request payload exceeds size limits
func (*PayloadTooLargeResponseError) Error ¶
func (e *PayloadTooLargeResponseError) Error() string
type PaymentRequiredResponseError ¶
type PaymentRequiredResponseError struct {
// Error data for PaymentRequiredResponse
Error_ components.PaymentRequiredResponseErrorData `json:"error"`
OpenrouterMetadata map[string]any `json:"openrouter_metadata,omitzero"`
UserID *string `json:"user_id,omitzero"`
}
PaymentRequiredResponseError - Payment Required - Insufficient credits or quota to complete request
func (*PaymentRequiredResponseError) Error ¶
func (e *PaymentRequiredResponseError) Error() string
type ProviderOverloadedResponseError ¶
type ProviderOverloadedResponseError struct {
// Error data for ProviderOverloadedResponse
Error_ components.ProviderOverloadedResponseErrorData `json:"error"`
OpenrouterMetadata map[string]any `json:"openrouter_metadata,omitzero"`
UserID *string `json:"user_id,omitzero"`
}
ProviderOverloadedResponseError - Provider Overloaded - Provider is temporarily overloaded
func (*ProviderOverloadedResponseError) Error ¶
func (e *ProviderOverloadedResponseError) Error() string
type RequestTimeoutResponseError ¶
type RequestTimeoutResponseError struct {
// Error data for RequestTimeoutResponse
Error_ components.RequestTimeoutResponseErrorData `json:"error"`
OpenrouterMetadata map[string]any `json:"openrouter_metadata,omitzero"`
UserID *string `json:"user_id,omitzero"`
}
RequestTimeoutResponseError - Request Timeout - Operation exceeded time limit
func (*RequestTimeoutResponseError) Error ¶
func (e *RequestTimeoutResponseError) Error() string
type ServiceUnavailableResponseError ¶
type ServiceUnavailableResponseError struct {
// Error data for ServiceUnavailableResponse
}
ServiceUnavailableResponseError - Service Unavailable - Service temporarily unavailable
func (*ServiceUnavailableResponseError) Error ¶
func (e *ServiceUnavailableResponseError) Error() string
type TooManyRequestsResponseError ¶
type TooManyRequestsResponseError struct {
// Error data for TooManyRequestsResponse
Error_ components.TooManyRequestsResponseErrorData `json:"error"`
OpenrouterMetadata map[string]any `json:"openrouter_metadata,omitzero"`
UserID *string `json:"user_id,omitzero"`
}
TooManyRequestsResponseError - Too Many Requests - Rate limit exceeded
func (*TooManyRequestsResponseError) Error ¶
func (e *TooManyRequestsResponseError) Error() string
type UnauthorizedResponseError ¶
type UnauthorizedResponseError struct {
// Error data for UnauthorizedResponse
}
UnauthorizedResponseError - Unauthorized - Authentication required or invalid credentials
func (*UnauthorizedResponseError) Error ¶
func (e *UnauthorizedResponseError) Error() string
type UnprocessableEntity ¶ added in v0.9.0
type UnprocessableEntity struct {
CreatePrivateEndpointValidationFailedResponseError *CreatePrivateEndpointValidationFailedResponseError `queryParam:"inline" union:"member"`
UnprocessableEntityResponseError *UnprocessableEntityResponseError `queryParam:"inline" union:"member"`
Type UnprocessableEntityType
}
UnprocessableEntity - The request was invalid, or validation failed. When `activate` was passed and the draft was created, `data` carries it and any validation checks.
func CreateUnprocessableEntityCreatePrivateEndpointValidationFailedResponseError ¶ added in v0.9.0
func CreateUnprocessableEntityCreatePrivateEndpointValidationFailedResponseError(createPrivateEndpointValidationFailedResponseError CreatePrivateEndpointValidationFailedResponseError) UnprocessableEntity
func CreateUnprocessableEntityUnprocessableEntityResponseError ¶ added in v0.9.0
func CreateUnprocessableEntityUnprocessableEntityResponseError(unprocessableEntityResponseError UnprocessableEntityResponseError) UnprocessableEntity
func (UnprocessableEntity) Error ¶ added in v0.9.0
func (u UnprocessableEntity) Error() string
func (UnprocessableEntity) MarshalJSON ¶ added in v0.9.0
func (u UnprocessableEntity) MarshalJSON() ([]byte, error)
func (*UnprocessableEntity) UnmarshalJSON ¶ added in v0.9.0
func (u *UnprocessableEntity) UnmarshalJSON(data []byte) error
type UnprocessableEntityResponseError ¶
type UnprocessableEntityResponseError struct {
// Error data for UnprocessableEntityResponse
Error_ components.UnprocessableEntityResponseErrorData `json:"error"`
OpenrouterMetadata map[string]any `json:"openrouter_metadata,omitzero"`
UserID *string `json:"user_id,omitzero"`
}
UnprocessableEntityResponseError - Unprocessable Entity - Semantic validation failure
func (*UnprocessableEntityResponseError) Error ¶
func (e *UnprocessableEntityResponseError) Error() string
type UnprocessableEntityType ¶ added in v0.9.0
type UnprocessableEntityType string
const ( UnprocessableEntityTypeCreatePrivateEndpointValidationFailedResponseError UnprocessableEntityType = "CreatePrivateEndpointValidationFailedResponse_error" UnprocessableEntityTypeUnprocessableEntityResponseError UnprocessableEntityType = "UnprocessableEntityResponse_error" )
Source Files
¶
- apierror.go
- badgatewayresponseerror.go
- badrequestresponseerror.go
- batcherrorresponse.go
- batchpaymentrequiredresponseerror.go
- conflictresponseerror.go
- createprivateendpoint.go
- createprivateendpointvalidationfailedresponseerror.go
- edgenetworktimeoutresponseerror.go
- forbiddenresponseerror.go
- gatewaytimeoutresponseerror.go
- goneresponseerror.go
- internalserverresponseerror.go
- internchaterrorresponse.go
- internlifecycleerror.go
- notfoundresponseerror.go
- oautherrorresponse.go
- payloadtoolargeresponseerror.go
- paymentrequiredresponseerror.go
- provideroverloadedresponseerror.go
- requesttimeoutresponseerror.go
- serviceunavailableresponseerror.go
- toomanyrequestsresponseerror.go
- unauthorizedresponseerror.go
- unprocessableentityresponseerror.go