Integrate Codex app-server support
Co-authored-by: codex <[email protected]>
This commit is contained in:
1 parent
038560e580
commit
90d0f40790
68 files changed
+17389
-19730
No files matched your search
@@ -312,10 +312,27 @@ export function trimOrNull<T extends string>(value: T | null | undefined): T | n
|
||||
return trimmed || null;
|
||||
}
|
||||
|
||||
function cloneSelections(
|
||||
selections: ReadonlyArray<ProviderOptionSelection>,
|
||||
): Array<ProviderOptionSelection> {
|
||||
return selections.map(cloneSelection);
|
||||
/**
|
||||
* Resolve the actual API model identifier from a model selection.
|
||||
*
|
||||
* Provider-aware: each provider can map `contextWindow` (or other options)
|
||||
* to whatever the API requires. The canonical slug stored in the selection
|
||||
* stays unchanged so the capabilities system keeps working.
|
||||
*/
|
||||
export function resolveApiModelId(modelSelection: ModelSelection): string {
|
||||
switch (modelSelection.provider) {
|
||||
case "claudeAgent": {
|
||||
switch (modelSelection.options?.contextWindow) {
|
||||
case "1m":
|
||||
return `${modelSelection.model}[1m]`;
|
||||
default:
|
||||
return modelSelection.model;
|
||||
}
|
||||
}
|
||||
default: {
|
||||
return modelSelection.model;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function createModelSelection(
|
||||
|
||||
Reference in new issue
Block a user