MCPcopy Create free account
hub / github.com/Work-Fisher/code-claw / buildUpstreamHeaders

Function buildUpstreamHeaders

tools/model-gateway/server.mjs:702–712  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

700}
701
702function buildUpstreamHeaders(config) {
703 const headers = {
704 'content-type': 'application/json',
705 }
706
707 if (config.upstreamApiKey) {
708 headers.authorization = `Bearer ${config.upstreamApiKey}`
709 }
710
711 return headers
712}
713
714function joinUrl(base, maybePath) {
715 const normalizedBase = base.endsWith('/') ? base.slice(0, -1) : base

Callers 2

handleNonStreamFunction · 0.85
handleStreamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected