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

Function top_p_for_model

crates/opencode-provider/src/transform.rs:586–599  ·  view source on GitHub ↗
(model_id: &str)

Source from the content-addressed store, hash-verified

584}
585
586pub fn top_p_for_model(model_id: &str) -> Option<f32> {
587 let id = model_id.to_lowercase();
588 if id.contains("qwen") {
589 return Some(1.0);
590 }
591 if id.contains("minimax-m2")
592 || id.contains("kimi-k2.5")
593 || id.contains("kimi-k2p5")
594 || id.contains("gemini")
595 {
596 return Some(0.95);
597 }
598 None
599}
600
601pub fn top_k_for_model(model_id: &str) -> Option<u32> {
602 let id = model_id.to_lowercase();

Callers 1

stream_messageFunction · 0.85

Calls 1

containsMethod · 0.80

Tested by

no test coverage detected