> ## Documentation Index
> Fetch the complete documentation index at: https://kawax.biz/llms.txt
> Use this file to discover all available pages before exploring further.

# Model, mode, name, and plan

> Use SessionRpc in Laravel Copilot SDK to change the model, mode, session name, and plan of a session.

## Model, mode, name, and plan

Scope: SessionRpc (per-session operations tied to a Session)

For an overview of RPC and the list of all RPC pages, see [RPC](https://kawax.biz/en/packages/laravel-copilot-sdk/rpc.md).

`model()->startupAdmission()` is an experimental RPC that reads the cached startup model state without fetching the catalog or resolving credentials. After applying startup settings, an interactive host can pass `claimEnablement: true` to claim the one-time enablement prompt for the session, but only when the catalog is ready. The claim is shared with the owning host and lasts for the life of the session. Check the state with `selectedModel`, `catalogReady`, and `requiresEnablement` in the result. When this call consumed the claim, `claimedEnablement` is `true` and `modelToEnable` holds the model to enable.

```php theme={null}
// model
$session->rpc()->model()->getCurrent();
// Omit the argument to only read the startup state
$admission = $session->rpc()->model()->startupAdmission();
// Claim the right to show the enablement prompt (array or ModelStartupAdmissionRequest)
$admission = $session->rpc()->model()->startupAdmission(['claimEnablement' => true]);
// When $admission->claimedEnablement is true, check $admission->modelToEnable
// Get the reasoning summary display policy for the current model (experimental)
$policy = $session->rpc()->model()->getReasoningSummaries(new ModelGetReasoningSummariesRequest(
    persistedShowReasoning: true, // Omit if not set
    summariesVisible: true, // Whether it's currently shown in the host UI
));
// $policy->ready, $policy->sessionShowsSummaries, $policy->visibility, etc.
// Change only the reasoning effort without changing the selected model (experimental)
$effort = $session->rpc()->model()->setReasoningEffort(
    new ModelSetReasoningEffortRequest(reasoningEffort: ReasoningEffort::HIGH),
);
// $effort->reasoningEffort
$session->rpc()->model()->switchTo(new ModelSwitchToRequest(modelId: 'gpt-4'));
// To specify reasoningEffort (supported models only)
$session->rpc()->model()->switchTo(new ModelSwitchToRequest(modelId: 'claude-opus-4.7', reasoningEffort: ReasoningEffort::HIGH));
// To specify reasoningSummary
$session->rpc()->model()->switchTo(new ModelSwitchToRequest(modelId: 'claude-opus-4.7', reasoningSummary: 'concise'));
// To specify contextTier (supported models only)
$session->rpc()->model()->switchTo(new ModelSwitchToRequest(modelId: 'gpt-4o', contextTier: 'long_context'));
// To override modelCapabilities
$session->rpc()->model()->switchTo(new ModelSwitchToRequest(
    modelId: 'gpt-4',
    modelCapabilities: new ModelCapabilitiesOverride(
        supports: new ModelCapabilitiesOverrideSupports(vision: true),
    ),
));
// Get the list of models available in the session (experimental)
$models = $session->rpc()->model()->list();
$models->auto?->tiers; // Auto routing preferences available to the account
$session->rpc()->model()->list(new ModelListRequest(skipCache: true)); // Skip the cache

// Change the Auto routing preference (doesn't change the selected model, experimental)
$session->rpc()->model()->switchAutoTier(new ModelSwitchAutoTierRequest(autoTier: AutoTier::BALANCE));
$session->rpc()->model()->switchAutoTier(new ModelSwitchAutoTierRequest(autoTier: null)); // Revert to provider-default Auto routing

// Change the Copilot Fusion tier without changing the selected model (experimental)
$session->rpc()->model()->switchFusionTier(new ModelSwitchFusionTierRequest(fusionTier: FusionTier::MAX));

// Set or clear the session's model allowlist from the host side (experimental)
$session->rpc()->model()->setAllowedModels(new ModelSetAllowedModelsRequest(allowedModels: ['gpt-5']));
$session->rpc()->model()->setAllowedModels(new ModelSetAllowedModelsRequest(allowedModels: null)); // Remove the restriction

// The setModel() helper can also take reasoningEffort and modelCapabilities
$session->setModel('claude-opus-4.7', ReasoningEffort::HIGH);
$session->setModel('claude-opus-4.7', 'high'); // A string also works
$session->setModel('gpt-4', modelCapabilities: ['supports' => ['vision' => true]]); // An array also works
// To specify autoTier (only effective when modelId is 'auto')
$session->setModel('auto', autoTier: AutoTier::INTELLIGENCE);
// To specify fusionTier (only valid when modelId is 'fusion' or 'auto'; can't be combined with autoTier)
$session->setModel('fusion', fusionTier: FusionTier::HIGH);

// Use the setAutoTier() helper to change only the Auto routing preference without changing the model (experimental)
$session->setAutoTier(AutoTier::EFFICIENCY);

// Use the setFusionTier() helper to change only the Copilot Fusion tier without changing the model (experimental)
$session->setFusionTier(FusionTier::STANDARD);

// mode
$session->rpc()->mode()->get();
$modeResult = $session->rpc()->mode()->set(new ModeSetRequest(mode: 'plan'));
// $modeResult->modeApplied, $modeResult->modelChanged, $modeResult->confirmation, etc.

// name
$session->rpc()->name()->get();
$session->rpc()->name()->set(new NameSetRequest(name: 'My Session'));
// Apply a summary as the session name if the user hasn't set a name (experimental)
$autoName = $session->rpc()->name()->setAuto(new NameSetAutoRequest(summary: 'Summary of the session'));
// $autoName->applied

// plan
$session->rpc()->plan()->read();
$session->rpc()->plan()->update(new PlanUpdateRequest(content: '...'));
$session->rpc()->plan()->delete();
// Read the SQLite todo list (plan mode)
$result = $session->rpc()->plan()->readSqlTodos();
// $result->rows - Array of PlanSqlTodosRow (id, title, description, status)

// Read the SQLite todo list with dependencies (experimental)
$result = $session->rpc()->plan()->readSqlTodosWithDependencies();
// $result->rows - Array of PlanSqlTodosRow
// $result->dependencies - Array of PlanSqlTodoDependency (todo_id, depends_on)
```


## Related topics

- [SessionRpc overview](https://kawax.biz/en/packages/laravel-copilot-sdk/rpc/session-overview.md)
- [RPC (Remote Procedure Call)](https://kawax.biz/en/packages/laravel-copilot-sdk/rpc.md)
- [Custom pivot models and chaperone](https://kawax.biz/en/advanced/eloquent-custom-pivot.md)
- [Models](https://kawax.biz/en/packages/laravel-copilot-sdk/models.md)
- [Getting started with Eloquent](https://kawax.biz/en/eloquent.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.