Infer the AI vendor from the agent name. Used as a fallback when `session.agent_vendor` is not set.
(agent_name: &str)
| 183 | /// |
| 184 | /// Used as a fallback when `session.agent_vendor` is not set. |
| 185 | pub(crate) fn vendor_from_agent_name(agent_name: &str) -> AIVendor { |
| 186 | match agent_name { |
| 187 | "claude-code" => AIVendor::Anthropic, |
| 188 | "gemini-cli" => AIVendor::Google, |
| 189 | "agy" => AIVendor::Google, |
| 190 | "codex" => AIVendor::OpenAI, |
| 191 | "kiro" => AIVendor::AmazonBedrock, |
| 192 | "copilot" => AIVendor::Other("github".to_string()), |
| 193 | "cursor" => AIVendor::Anthropic, |
| 194 | "opencode" => AIVendor::OpenAI, |
| 195 | "grok" => AIVendor::XAI, |
| 196 | _ => AIVendor::Other(agent_name.to_string()), |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | // SessionEnvelope Construction |
| 201 |
no outgoing calls