feat(config): add support for Fork in OAuth model mappings with alias handling

Implemented `Fork` flag in `ModelNameMapping` to allow aliases as additional models while preserving the original model ID. Updated the `applyOAuthModelMappings` logic, added tests for `Fork` behavior, and updated documentation and examples accordingly.
This commit is contained in:
Luis Pater
2026-01-04 01:18:29 +08:00
parent 7a77b23f2d
commit 44b6c872e2
6 changed files with 141 additions and 8 deletions

View File

@@ -80,6 +80,9 @@ func summarizeOAuthModelMappingList(list []config.ModelNameMapping) OAuthModelMa
continue
}
key := name + "->" + alias
if mapping.Fork {
key += "|fork"
}
if _, exists := seen[key]; exists {
continue
}