MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / build_headers

Method build_headers

crates/opencode-provider/src/responses.rs:1041–1048  ·  view source on GitHub ↗
(&self, accept: &str)

Source from the content-addressed store, hash-verified

1039 }
1040
1041 fn build_headers(&self, accept: &str) -> HashMap<String, String> {
1042 let mut headers = HashMap::from([
1043 ("Content-Type".to_string(), "application/json".to_string()),
1044 ("Accept".to_string(), accept.to_string()),
1045 ]);
1046 headers.extend((self.config.headers)());
1047 headers
1048 }
1049
1050 pub async fn get_args(&self, options: &GenerateOptions) -> Result<PreparedArgs, ProviderError> {
1051 let model_config = get_responses_model_config(&self.model_id);

Callers 2

do_generateMethod · 0.45
do_streamMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected