Skip to main content
Resuming a session runs it on the model it was recorded with — a later change to your default model does not silently rewrite an ongoing conversation.

Quick Start

1

Start a session on a model

2

Change your default — resume still uses the original

3

Override on resume when you want a different model


How It Works

The wrapper reads the recorded model from the session store before the credential gate, so a resumed cloud session is never shadowed by a reachable local endpoint. The store resolves the recorded model from the session-level metadata["model"] first, then from the most recent turn that recorded its own model. When neither exists it returns None, so the caller falls back to normal default resolution.

Precedence

The model that wins on resume is the first non-empty entry in this order.

Legacy Session Files

Older PraisonAI versions stored model / llm as top-level fields rather than under metadata. On load, the store folds those legacy fields back into metadata so historical sessions recover their recorded model without any migration.
Existing metadata values always win over the mirrored top-level value.

Best Practices

Resuming without --model keeps the conversation on its original model. Only pass --model when you deliberately want to switch mid-thread.
Passing --model on resume both overrides the recorded model and records the new one for subsequent turns, so the switch persists.
The recorded-model lookup runs before the keyless local-first gate, so a resumed cloud session is not switched to a local model just because Ollama or LM Studio is reachable.
Sessions created by older versions recover their recorded model automatically — no export/re-import step is needed.

Session Resume

Continue previous conversations

Keyless Local-First Run

Auto-detect local endpoints when no cloud key is set