mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 22:03:45 +00:00
split 1
This commit is contained in:
parent
c3d8eaff68
commit
3dc1f1dcc5
1 changed files with 3 additions and 1 deletions
|
|
@ -521,7 +521,9 @@ export async function main(args: string[]) {
|
|||
const savedModel = sessionManager.loadModel();
|
||||
if (savedModel) {
|
||||
// Parse provider/modelId from saved model string (format: "provider/modelId")
|
||||
const [savedProvider, savedModelId] = savedModel.split("/");
|
||||
// Some providers or model IDs may contain slashes, so split only on the first slash.
|
||||
// For example, "openrouter/x-ai/grok-4-fast" -> provider: "openrouter", modelId: "x-ai/grok-4-fast".
|
||||
const [savedProvider, savedModelId] = savedModel.split("/", 1);
|
||||
if (savedProvider && savedModelId) {
|
||||
try {
|
||||
const restoredModel = getModel(savedProvider as any, savedModelId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue