MCPcopy Create free account

hub / github.com/cucoleadan/opencode-cowork-proxy / functions

Functions40 in github.com/cucoleadan/opencode-cowork-proxy

↓ 28 callersFunctionformatAnthropicToOpenAI
(body: any)
src/translate/request/anthropic-to-openai.ts:15
↓ 22 callersFunctionformatOpenAIToAnthropic
(body: any)
src/translate/request/openai-to-anthropic.ts:23
↓ 15 callersFunctionenqueueSSE
(controller: ReadableStreamDefaultController, eventType: string, data: any)
src/translate/stream/openai-to-anthropic.ts:6
↓ 9 callersFunctionextractCachedTokens
(usage: any)
src/cache.ts:43
↓ 9 callersFunctionhashSystemPrompt
(system: string | any[] | undefined)
src/cache.ts:7
↓ 8 callersFunctionextractApiKey
(headers: Headers | Record<string, string | null>)
src/auth.ts:6
↓ 7 callersFunctioncollectStream
Helper: collect all chunks from a ReadableStream into a string
test/stream.test.ts:6
↓ 7 callersFunctionsseStream
Helper: create a ReadableStream from SSE text chunks
test/stream.test.ts:19
↓ 7 callersFunctionvalidateApiKey
(key: string | null)
src/auth.ts:19
↓ 6 callersFunctionextractOutputTokens
(usage: any)
src/cache.ts:71
↓ 5 callersFunctionemitChunk
(delta: any, finishReason?: string)
src/translate/stream/anthropic-to-openai.ts:22
↓ 5 callersFunctionextractInputTokens
(usage: any)
src/cache.ts:52
↓ 5 callersFunctionstreamOpenAIToAnthropic
(openaiStream: ReadableStream, model: string)
src/translate/stream/openai-to-anthropic.ts:3
↓ 4 callersFunctionhasCacheControl
(messages: any[], system?: any)
src/cache.ts:22
↓ 4 callersFunctionstreamAnthropicToOpenAI
(anthropicStream: ReadableStream, model: string)
src/translate/stream/anthropic-to-openai.ts:4
↓ 3 callersFunctionanthropicHeaders
(request: Request, key: string)
src/index.ts:64
↓ 3 callersFunctionauthErrorResponse
(err: AuthError)
src/auth.ts:35
↓ 3 callersFunctionextractModelSegment
(path: string)
src/index.ts:29
↓ 3 callersFunctionextractUncachedInputTokens
(usage: any)
src/cache.ts:66
↓ 3 callersFunctiontokenCount
(...values: any[])
src/cache.ts:35
↓ 3 callersFunctionupstreamErrorResponse
(res: Response, body: string)
src/index.ts:83
↓ 2 callersFunctionenqueueSSE
(controller: ReadableStreamDefaultController, data: any)
src/translate/stream/anthropic-to-openai.ts:7
↓ 2 callersFunctionget
(name: string)
src/auth.ts:7
↓ 2 callersFunctionprocessEvents
(lines: string[])
src/translate/stream/anthropic-to-openai.ts:34
↓ 2 callersFunctionprocessStreamDelta
(delta: any, parsed: any)
src/translate/stream/openai-to-anthropic.ts:26
↓ 2 callersFunctionstripPrefix
(path: string, prefix: string)
src/index.ts:23
↓ 1 callersFunctiongetUpstream
(request: Request, routeUpstream: string)
src/index.ts:55
↓ 1 callersFunctionhandleRequest
(request: Request)
src/index.ts:92
↓ 1 callersFunctionhasImages
(body: any)
src/index.ts:75
↓ 1 callersFunctionimageSourceFromUrl
(url: string | undefined)
src/translate/request/openai-to-anthropic.ts:15
↓ 1 callersFunctionparseToolArguments
* Converts OpenAI Chat Completions request to Anthropic Messages request.
src/translate/request/openai-to-anthropic.ts:5
↓ 1 callersFunctionparseToolArguments
(value: string | undefined)
src/translate/response/openai-to-anthropic.ts:3
↓ 1 callersFunctionrouteConfig
(request: Request)
src/index.ts:37
↓ 1 callersFunctiontranslateImageBlock
(part: any)
src/translate/request/anthropic-to-openai.ts:3
↓ 1 callersFunctionupstreamFormat
(request: Request)
src/index.ts:59
FunctionformatAnthropicToOpenAI
(response: any, model: string)
src/translate/response/anthropic-to-openai.ts:6
FunctionformatOpenAIToAnthropic
(completion: any, model: string)
src/translate/response/openai-to-anthropic.ts:13
Functionpull
(controller)
test/stream.test.ts:22
Functionstart
(controller)
src/translate/stream/openai-to-anthropic.ts:11
Functionstart
(controller)
src/translate/stream/anthropic-to-openai.ts:12