mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-08-05 13:10:31 +08:00
chore: update OpenAPI spec from monorepo (#245)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
This commit is contained in:
co-authored by
OpenRouter SDK Bot
parent
ec85ab283b
commit
9312cabf22
+147
-12
@@ -17107,13 +17107,55 @@ paths:
|
|||||||
'403':
|
'403':
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
example:
|
examples:
|
||||||
error:
|
guardrail-blocked:
|
||||||
code: 403
|
summary: Guardrail blocked the request
|
||||||
message: Only management keys can perform this operation
|
value:
|
||||||
|
error:
|
||||||
|
code: 403
|
||||||
|
message: 'Request blocked: prompt injection patterns detected'
|
||||||
|
metadata:
|
||||||
|
patterns:
|
||||||
|
- ignore all previous instructions
|
||||||
|
openrouter_metadata:
|
||||||
|
attempt: 1
|
||||||
|
endpoints:
|
||||||
|
available:
|
||||||
|
- model: openai/gpt-4o
|
||||||
|
provider: OpenAI
|
||||||
|
selected: false
|
||||||
|
total: 1
|
||||||
|
is_byok: false
|
||||||
|
pipeline:
|
||||||
|
- data:
|
||||||
|
action: blocked
|
||||||
|
detected: true
|
||||||
|
engines:
|
||||||
|
- regex
|
||||||
|
patterns:
|
||||||
|
- ignore all previous instructions
|
||||||
|
guardrail_id: grd_abc123
|
||||||
|
guardrail_scope: api-key
|
||||||
|
name: regex_pi_detection
|
||||||
|
summary: 'Blocked: prompt injection detected (1 pattern matched)'
|
||||||
|
type: guardrail
|
||||||
|
region: iad
|
||||||
|
requested: openai/gpt-4o
|
||||||
|
strategy: direct
|
||||||
|
summary: available=1
|
||||||
|
insufficient-permissions:
|
||||||
|
summary: Insufficient permissions
|
||||||
|
value:
|
||||||
|
error:
|
||||||
|
code: 403
|
||||||
|
message: Only management keys can perform this operation
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ForbiddenResponse'
|
$ref: '#/components/schemas/ForbiddenResponse'
|
||||||
description: Forbidden - Authentication successful but insufficient permissions
|
description: >-
|
||||||
|
Forbidden - Authentication successful but insufficient permissions, or a guardrail blocked the request. When
|
||||||
|
guardrails block and the `X-OpenRouter-Experimental-Metadata: enabled` header is present, the response
|
||||||
|
includes `openrouter_metadata` with full routing context and a `pipeline` array containing guardrail stage
|
||||||
|
details.
|
||||||
'404':
|
'404':
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@@ -20778,14 +20820,55 @@ paths:
|
|||||||
'403':
|
'403':
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
example:
|
examples:
|
||||||
error:
|
guardrail-blocked:
|
||||||
message: Permission denied
|
summary: Guardrail blocked the request
|
||||||
type: permission_error
|
value:
|
||||||
type: error
|
error:
|
||||||
|
code: 403
|
||||||
|
message: 'Request blocked: prompt injection patterns detected'
|
||||||
|
metadata:
|
||||||
|
patterns:
|
||||||
|
- ignore all previous instructions
|
||||||
|
openrouter_metadata:
|
||||||
|
attempt: 1
|
||||||
|
endpoints:
|
||||||
|
available:
|
||||||
|
- model: openai/gpt-4o
|
||||||
|
provider: OpenAI
|
||||||
|
selected: false
|
||||||
|
total: 1
|
||||||
|
is_byok: false
|
||||||
|
pipeline:
|
||||||
|
- data:
|
||||||
|
action: blocked
|
||||||
|
detected: true
|
||||||
|
engines:
|
||||||
|
- regex
|
||||||
|
patterns:
|
||||||
|
- ignore all previous instructions
|
||||||
|
guardrail_id: grd_abc123
|
||||||
|
guardrail_scope: api-key
|
||||||
|
name: regex_pi_detection
|
||||||
|
summary: 'Blocked: prompt injection detected (1 pattern matched)'
|
||||||
|
type: guardrail
|
||||||
|
region: iad
|
||||||
|
requested: openai/gpt-4o
|
||||||
|
strategy: direct
|
||||||
|
summary: available=1
|
||||||
|
insufficient-permissions:
|
||||||
|
summary: Insufficient permissions
|
||||||
|
value:
|
||||||
|
error:
|
||||||
|
code: 403
|
||||||
|
message: Only management keys can perform this operation
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/MessagesErrorResponse'
|
$ref: '#/components/schemas/ForbiddenResponse'
|
||||||
description: Permission denied error
|
description: >-
|
||||||
|
Forbidden - Authentication successful but insufficient permissions, or a guardrail blocked the request. When
|
||||||
|
guardrails block and the `X-OpenRouter-Experimental-Metadata: enabled` header is present, the response
|
||||||
|
includes `openrouter_metadata` with full routing context and a `pipeline` array containing guardrail stage
|
||||||
|
details.
|
||||||
'404':
|
'404':
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@@ -22311,6 +22394,58 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/PaymentRequiredResponse'
|
$ref: '#/components/schemas/PaymentRequiredResponse'
|
||||||
description: Payment Required - Insufficient credits or quota to complete request
|
description: Payment Required - Insufficient credits or quota to complete request
|
||||||
|
'403':
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
examples:
|
||||||
|
guardrail-blocked:
|
||||||
|
summary: Guardrail blocked the request
|
||||||
|
value:
|
||||||
|
error:
|
||||||
|
code: 403
|
||||||
|
message: 'Request blocked: prompt injection patterns detected'
|
||||||
|
metadata:
|
||||||
|
patterns:
|
||||||
|
- ignore all previous instructions
|
||||||
|
openrouter_metadata:
|
||||||
|
attempt: 1
|
||||||
|
endpoints:
|
||||||
|
available:
|
||||||
|
- model: openai/gpt-4o
|
||||||
|
provider: OpenAI
|
||||||
|
selected: false
|
||||||
|
total: 1
|
||||||
|
is_byok: false
|
||||||
|
pipeline:
|
||||||
|
- data:
|
||||||
|
action: blocked
|
||||||
|
detected: true
|
||||||
|
engines:
|
||||||
|
- regex
|
||||||
|
patterns:
|
||||||
|
- ignore all previous instructions
|
||||||
|
guardrail_id: grd_abc123
|
||||||
|
guardrail_scope: api-key
|
||||||
|
name: regex_pi_detection
|
||||||
|
summary: 'Blocked: prompt injection detected (1 pattern matched)'
|
||||||
|
type: guardrail
|
||||||
|
region: iad
|
||||||
|
requested: openai/gpt-4o
|
||||||
|
strategy: direct
|
||||||
|
summary: available=1
|
||||||
|
insufficient-permissions:
|
||||||
|
summary: Insufficient permissions
|
||||||
|
value:
|
||||||
|
error:
|
||||||
|
code: 403
|
||||||
|
message: Only management keys can perform this operation
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ForbiddenResponse'
|
||||||
|
description: >-
|
||||||
|
Forbidden - Authentication successful but insufficient permissions, or a guardrail blocked the request. When
|
||||||
|
guardrails block and the `X-OpenRouter-Experimental-Metadata: enabled` header is present, the response
|
||||||
|
includes `openrouter_metadata` with full routing context and a `pipeline` array containing guardrail stage
|
||||||
|
details.
|
||||||
'404':
|
'404':
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
|
|||||||
Reference in New Issue
Block a user