Infer the AI vendor from the agent name. Used as a fallback when `session.agent_vendor` is not set.
(agent_name: &str)
| 159 | /// |
| 160 | /// Used as a fallback when `session.agent_vendor` is not set. |
| 161 | pub(crate) fn vendor_from_agent_name(agent_name: &str) -> AIVendor { |
| 162 | match agent_name { |
| 163 | "claude-code" => AIVendor::Anthropic, |
| 164 | "gemini-cli" => AIVendor::Google, |
| 165 | "codex" => AIVendor::OpenAI, |
| 166 | "kiro" => AIVendor::AmazonBedrock, |
| 167 | "copilot" => AIVendor::Other("github".to_string()), |
| 168 | "cursor" => AIVendor::Anthropic, |
| 169 | "opencode" => AIVendor::OpenAI, |
| 170 | _ => AIVendor::Other(agent_name.to_string()), |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | // SessionEnvelope Construction |
| 175 |
no outgoing calls