Merge pull request #686 from ajkdrag/main

feat: regex support for model-mappings
This commit is contained in:
Luis Pater
2025-12-24 04:37:44 +08:00
committed by GitHub
4 changed files with 145 additions and 21 deletions
+5
View File
@@ -144,6 +144,11 @@ type AmpModelMapping struct {
// To is the target model name to route to (e.g., "claude-sonnet-4").
// The target model must have available providers in the registry.
To string `yaml:"to" json:"to"`
// Regex indicates whether the 'from' field should be interpreted as a regular
// expression for matching model names. When true, this mapping is evaluated
// after exact matches and in the order provided. Defaults to false (exact match).
Regex bool `yaml:"regex,omitempty" json:"regex,omitempty"`
}
// AmpCode groups Amp CLI integration settings including upstream routing,