first commit

This commit is contained in:
Beyhan Oğur
2026-04-26 21:52:23 +03:00
commit 880f412e2c
2662 changed files with 866266 additions and 0 deletions

View File

@@ -0,0 +1,105 @@
# Anthropic Integration Batch API Schemas
AnthropicBatchCreateRequest:
type: object
required:
- requests
properties:
requests:
type: array
items:
$ref: '#/AnthropicBatchRequestItem'
description: Array of batch request items
AnthropicBatchRequestItem:
type: object
required:
- custom_id
- params
properties:
custom_id:
type: string
description: Unique identifier for this request
params:
type: object
description: Request parameters (same as AnthropicMessageRequest)
AnthropicBatchCreateResponse:
type: object
properties:
id:
type: string
type:
type: string
default: message_batch
processing_status:
type: string
enum: [in_progress, ended, canceling]
request_counts:
$ref: '#/AnthropicBatchRequestCounts'
ended_at:
type: string
format: date-time
nullable: true
created_at:
type: string
format: date-time
expires_at:
type: string
format: date-time
archived_at:
type: string
format: date-time
nullable: true
cancel_initiated_at:
type: string
format: date-time
nullable: true
results_url:
type: string
nullable: true
AnthropicBatchRequestCounts:
type: object
properties:
processing:
type: integer
succeeded:
type: integer
errored:
type: integer
canceled:
type: integer
expired:
type: integer
AnthropicBatchListRequest:
type: object
properties:
page_size:
type: integer
default: 20
page_token:
type: string
description: Cursor for pagination
AnthropicBatchListResponse:
type: object
properties:
data:
type: array
items:
$ref: '#/AnthropicBatchCreateResponse'
has_more:
type: boolean
first_id:
type: string
last_id:
type: string
AnthropicBatchRetrieveResponse:
$ref: '#/AnthropicBatchCreateResponse'
AnthropicBatchCancelResponse:
$ref: '#/AnthropicBatchCreateResponse'

View File

@@ -0,0 +1,53 @@
# Anthropic Integration Common Types
AnthropicError:
type: object
properties:
type:
type: string
default: error
error:
type: object
properties:
type:
type: string
description: Error type (e.g., invalid_request_error, api_error)
message:
type: string
description: Error message
AnthropicModel:
type: object
properties:
id:
type: string
description: Model identifier
type:
type: string
default: model
display_name:
type: string
created_at:
type: string
format: date-time
AnthropicListModelsResponse:
type: object
properties:
data:
type: array
items:
$ref: '#/AnthropicModel'
has_more:
type: boolean
first_id:
type: string
last_id:
type: string
# Anthropic Message Roles
AnthropicMessageRole:
type: string
enum:
- user
- assistant

View File

@@ -0,0 +1,13 @@
# Anthropic Integration Count Tokens Schemas
AnthropicCountTokensRequest:
# Uses the same format as AnthropicMessageRequest
allOf:
- $ref: './messages.yaml#/AnthropicMessageRequest'
AnthropicCountTokensResponse:
type: object
properties:
input_tokens:
type: integer
description: Number of input tokens

View File

@@ -0,0 +1,102 @@
# Anthropic Integration Files API Schemas
AnthropicFileUploadRequest:
type: object
required:
- file
properties:
file:
type: string
format: binary
description: File to upload (raw file content)
filename:
type: string
description: Original filename
purpose:
type: string
description: Purpose of the file (e.g., "batch")
AnthropicFileUploadResponse:
type: object
properties:
id:
type: string
type:
type: string
default: file
filename:
type: string
mime_type:
type: string
description: MIME type of the file
size_bytes:
type: integer
description: Size of the file in bytes
created_at:
type: string
format: date-time
downloadable:
type: boolean
AnthropicFileListRequest:
type: object
properties:
limit:
type: integer
default: 30
after:
type: string
description: Cursor for pagination (after_id)
order:
type: string
enum: [asc, desc]
AnthropicFileListResponse:
type: object
properties:
data:
type: array
items:
$ref: '#/AnthropicFileUploadResponse'
has_more:
type: boolean
first_id:
type: string
last_id:
type: string
AnthropicFileRetrieveRequest:
type: object
required:
- file_id
properties:
file_id:
type: string
AnthropicFileRetrieveResponse:
$ref: '#/AnthropicFileUploadResponse'
AnthropicFileDeleteRequest:
type: object
required:
- file_id
properties:
file_id:
type: string
AnthropicFileDeleteResponse:
type: object
properties:
id:
type: string
type:
type: string
default: file_deleted
AnthropicFileContentRequest:
type: object
required:
- file_id
properties:
file_id:
type: string

View File

@@ -0,0 +1,403 @@
# Anthropic Integration Messages API Schemas
AnthropicMessageRequest:
type: object
required:
- model
- max_tokens
- messages
properties:
model:
type: string
description: Model identifier (e.g., claude-3-opus-20240229)
example: claude-3-opus-20240229
max_tokens:
type: integer
description: Maximum tokens to generate
messages:
type: array
items:
$ref: '#/AnthropicMessage'
description: List of messages in the conversation
system:
$ref: '#/AnthropicContent'
description: System prompt
cache_control:
$ref: '../../inference/common.yaml#/CacheControl'
description: Automatic caching directives for the whole request
metadata:
$ref: '#/AnthropicMetadata'
stream:
type: boolean
description: Whether to stream the response
temperature:
type: number
minimum: 0
maximum: 1
top_p:
type: number
top_k:
type: integer
stop_sequences:
type: array
items:
type: string
tools:
type: array
items:
$ref: '#/AnthropicTool'
tool_choice:
$ref: '#/AnthropicToolChoice'
mcp_servers:
type: array
items:
$ref: '#/AnthropicMCPServer'
description: MCP servers configuration (requires beta header)
thinking:
$ref: '#/AnthropicThinking'
output_format:
type: object
description: Structured output format (requires beta header)
# Bifrost-specific
fallbacks:
type: array
items:
type: string
AnthropicMessage:
type: object
required:
- role
- content
properties:
role:
$ref: './common.yaml#/AnthropicMessageRole'
content:
$ref: '#/AnthropicContent'
AnthropicContent:
oneOf:
- type: string
- type: array
items:
$ref: '#/AnthropicContentBlock'
description: Content - can be a string or array of content blocks
AnthropicContentBlock:
type: object
required:
- type
properties:
type:
type: string
enum:
- text
- image
- document
- tool_use
- server_tool_use
- tool_result
- web_search_result
- mcp_tool_use
- mcp_tool_result
- thinking
- redacted_thinking
text:
type: string
description: For text content
thinking:
type: string
description: For thinking content
signature:
type: string
description: For signature content
data:
type: string
description: For data content (encrypted data for redacted thinking)
tool_use_id:
type: string
description: For tool_result content
id:
type: string
description: For tool_use content
name:
type: string
description: For tool_use content
input:
type: object
description: For tool_use content
server_name:
type: string
description: For mcp_tool_use content
content:
$ref: '#/AnthropicContent'
description: For tool_result content
source:
$ref: '#/AnthropicSource'
description: For image/document content
cache_control:
$ref: '../../inference/common.yaml#/CacheControl'
citations:
$ref: '#/AnthropicCitationsConfig'
description: For document content
context:
type: string
description: For document content
title:
type: string
description: For document content
AnthropicSource:
type: object
required:
- type
properties:
type:
type: string
enum: [base64, url, text, content_block]
media_type:
type: string
description: MIME type (e.g., image/jpeg, application/pdf)
data:
type: string
description: Base64-encoded data (for base64 type)
url:
type: string
description: URL (for url type)
AnthropicCitationsConfig:
type: object
properties:
enabled:
type: boolean
AnthropicMetadata:
type: object
properties:
user_id:
type: string
AnthropicThinking:
type: object
properties:
type:
type: string
enum: [enabled, disabled]
budget_tokens:
type: integer
AnthropicTool:
type: object
properties:
type:
type: string
enum:
- custom
- bash_20250124
- computer_20250124
- computer_20251124
- code_execution_20250522
- code_execution_20250825
- code_execution_20260120
- text_editor_20250124
- text_editor_20250429
- text_editor_20250728
- web_search_20250305
- web_search_20260209
- web_fetch_20250910
- web_fetch_20260209
- web_fetch_20260309
- memory_20250818
- tool_search_tool_bm25
- tool_search_tool_bm25_20251119
- tool_search_tool_regex
- tool_search_tool_regex_20251119
name:
type: string
description: Tool name (for custom tools)
description:
type: string
input_schema:
type: object
description: JSON Schema for tool input
cache_control:
$ref: '../../inference/common.yaml#/CacheControl'
# Computer use tool settings
display_width_px:
type: integer
display_height_px:
type: integer
display_number:
type: integer
enable_zoom:
type: boolean
# Web search settings
max_uses:
type: integer
allowed_domains:
type: array
items:
type: string
blocked_domains:
type: array
items:
type: string
user_location:
$ref: '#/AnthropicToolWebSearchUserLocation'
AnthropicToolWebSearchUserLocation:
type: object
properties:
type:
type: string
enum: [approximate]
city:
type: string
country:
type: string
timezone:
type: string
AnthropicToolChoice:
oneOf:
- type: object
properties:
type:
type: string
enum: [auto, any, tool, none]
name:
type: string
description: Required when type is 'tool'
disable_parallel_tool_use:
type: boolean
AnthropicMCPServer:
type: object
properties:
type:
type: string
name:
type: string
url:
type: string
authorization_token:
type: string
description: Authorization token for the MCP server
tool_configuration:
$ref: '#/AnthropicMCPToolConfig'
AnthropicMCPToolConfig:
type: object
properties:
enabled:
type: boolean
allowed_tools:
type: array
items:
type: string
# Response types
AnthropicMessageResponse:
type: object
properties:
id:
type: string
type:
type: string
default: message
role:
type: string
default: assistant
content:
type: array
items:
$ref: '#/AnthropicContentBlock'
model:
type: string
stop_reason:
type: string
enum: [end_turn, max_tokens, stop_sequence, tool_use, pause_turn, refusal, model_context_window_exceeded, null]
stop_sequence:
type: string
nullable: true
usage:
$ref: '#/AnthropicUsage'
AnthropicUsage:
type: object
properties:
input_tokens:
type: integer
output_tokens:
type: integer
cache_creation_input_tokens:
type: integer
cache_read_input_tokens:
type: integer
cache_creation:
$ref: '#/AnthropicUsageCacheCreation'
AnthropicUsageCacheCreation:
type: object
properties:
ephemeral_5m_input_tokens:
type: integer
ephemeral_1h_input_tokens:
type: integer
# Stream event types
AnthropicStreamEvent:
type: object
properties:
id:
type: string
type:
type: string
enum:
- message_start
- content_block_start
- content_block_delta
- content_block_stop
- message_delta
- message_stop
- ping
- error
message:
$ref: '#/AnthropicMessageResponse'
index:
type: integer
content_block:
$ref: '#/AnthropicContentBlock'
delta:
$ref: '#/AnthropicStreamDelta'
usage:
$ref: '#/AnthropicUsage'
error:
$ref: '#/AnthropicStreamError'
AnthropicStreamDelta:
type: object
properties:
type:
type: string
enum: [text_delta, input_json_delta, thinking_delta, signature_delta]
text:
type: string
partial_json:
type: string
thinking:
type: string
signature:
type: string
stop_reason:
type: string
stop_sequence:
type: string
AnthropicStreamError:
type: object
properties:
type:
type: string
message:
type: string

View File

@@ -0,0 +1,62 @@
# Anthropic Integration Text Completions Schemas (Legacy Complete API)
AnthropicTextRequest:
type: object
required:
- model
- prompt
- max_tokens_to_sample
properties:
model:
type: string
description: Model identifier
prompt:
type: string
description: The prompt to complete
max_tokens_to_sample:
type: integer
description: Maximum tokens to generate
stream:
type: boolean
temperature:
type: number
minimum: 0
maximum: 1
top_p:
type: number
top_k:
type: integer
stop_sequences:
type: array
items:
type: string
# Bifrost-specific
fallbacks:
type: array
items:
type: string
AnthropicTextResponse:
type: object
properties:
type:
type: string
default: completion
id:
type: string
completion:
type: string
stop_reason:
type: string
enum: [stop_sequence, max_tokens, null]
model:
type: string
usage:
type: object
properties:
input_tokens:
type: integer
description: Number of input tokens used
output_tokens:
type: integer
description: Number of output tokens generated