MCPcopy Create free account
hub / github.com/AI45Lab/Code / get_headers

Method get_headers

core/src/config/provider.rs:174–178  ·  view source on GitHub ↗

Get the effective static headers for a model (provider defaults with model overrides)

(&self, model: &ModelConfig)

Source from the content-addressed store, hash-verified

172
173 /// Get the effective static headers for a model (provider defaults with model overrides)
174 pub fn get_headers(&self, model: &ModelConfig) -> HashMap<String, String> {
175 let mut headers = self.headers.clone();
176 headers.extend(model.headers.clone());
177 headers
178 }
179
180 /// Get the header name that should carry the runtime session ID.
181 pub fn get_session_id_header<'a>(&'a self, model: &'a ModelConfig) -> Option<&'a str> {

Calls 1

cloneMethod · 0.45