pub fn when_model(pattern: &str) -> impl Fn(&Request) -> bool {
    let regex = Regex::new(pattern).unwrap_or_else(|_| panic!("Invalid regex pattern: {pattern}"));

    move |req: &Request| {
        req.model
            .as_ref()
            .map(|name| regex.is_match(name.as_str()))
            .unwrap_or(true)
    }
}
Creates a condition function that matches requests when the model name
matches the given regex pattern.

# Arguments
* `pattern` - A regex pattern to match against the model name

# Returns
A function that returns true when the model name matches the pattern.

# Examples
```rust,ignore
// Apply transformation only for Claude models
let conditional_transformer = my_transformer.when(when_model("claude"));
```
crates/forge_provider/src/forge_provider/transformers/when_model.rs