MCPcopy Create free account
hub / github.com/InferCore/InferCore / applyAPIKey

Method applyAPIKey

internal/adapters/gemini/gemini.go:376–384  ·  view source on GitHub ↗
(req *http.Request)

Source from the content-addressed store, hash-verified

374}
375
376func (a *Adapter) applyAPIKey(req *http.Request) {
377 if k := a.apiKey(); k != "" {
378 if a.vertex {
379 req.Header.Set("Authorization", "Bearer "+k)
380 } else {
381 req.Header.Set("x-goog-api-key", k)
382 }
383 }
384}
385
386func (a *Adapter) applyExtraHeaders(req *http.Request) {
387 for hk, v := range a.cfg.Headers {

Callers 3

invokeNonStreamMethod · 0.95
invokeStreamMethod · 0.95
HealthMethod · 0.95

Calls 1

apiKeyMethod · 0.95

Tested by

no test coverage detected