Documentation
¶
Overview ¶
Package protocol describes supported wire protocols without depending on catalog storage, execution, or desktop presentation.
Index ¶
Constants ¶
View Source
const ( MSHCacheWriteHeader5m = "Msh-Usage-Cache-Write-Tokens-5m" MSHCacheWriteHeader1h = "Msh-Usage-Cache-Write-Tokens-1h" MSHCacheWriteMetric5m = "msh_usage_cache_write_tokens_5m" MSHCacheWriteMetric1h = "msh_usage_cache_write_tokens_1h" StreamFinalUsageMetric = "stream_final_usage_count" )
View Source
const ( OpenAIChat = "openai-chat" OpenAIResponses = "openai-responses" AnthropicMessages = "anthropic-messages" Seedance = "seedance" WanVideo = "wan-video" MiniMaxVideo = "minimax-video" OpenAIChatPath = "/v1/chat/completions" OpenAIResponsesPath = "/v1/responses" AnthropicMessagesPath = "/v1/messages" OpenAIModelsPath = "/v1/models" SeedancePath = "/api/v3/contents/generations/tasks" WanVideoPath = "/api/v1/services/aigc/video-generation/video-synthesis" MiniMaxVideoPath = "/v2/video_generation" )
Variables ¶
View Source
var ErrInvalidAddress = errors.New("invalid service address")
Functions ¶
This section is empty.
Types ¶
type Descriptor ¶
type Descriptor struct {
ID string
Label string
Async bool
RequestPaths []RequestPath
}
Descriptor contains protocol-wide behavior. Model-specific limits and request contracts remain in version-scoped Case definitions.
func All ¶
func All() []Descriptor
func Lookup ¶
func Lookup(id string) (Descriptor, bool)
type RequestPath ¶
type ResolvedAddress ¶
func ResolveAddress ¶
func ResolveAddress(address, requestPath string, knownPaths []RequestPath) (ResolvedAddress, error)
ResolveAddress accepts a service root, a partially entered route, or a complete endpoint. Known sibling endpoints share the same service prefix (for example, a video submit URL must still allow polling its task).
Click to show internal directories.
Click to hide internal directories.