Skip to content

Select‑ShpModel

Raimund edited this page Jun 12, 2026 · 1 revision

SYNOPSIS

Sets the default model (and optional reasoning effort and output cap) used by subsequent Invoke-Shp calls.

SYNTAX

Set (Default)

Select-ShpModel [-Model] <String> [-ReasoningEffort <String>] [-MaxOutputTokens <Int32>] [-PassThru]
 [-WhatIf] [-Confirm] [<CommonParameters>]

Clear

Select-ShpModel [-Clear] [-PassThru] [-WhatIf] [-Confirm]
 [<CommonParameters>]

DESCRIPTION

Stores a session default for the model, and optionally the reasoning effort and maximum output tokens, so you do not have to pass them on every Invoke-Shp call. Invoke-Shp uses these defaults whenever the matching parameter is not supplied explicitly; an explicit parameter on an individual call always wins.

The defaults are scoped to the current PowerShell session (a module variable) and are not persisted to disk. View them with Get-ShpDefault and reset them with Select-ShpModel -Clear.

The -Model parameter accepts pipeline input by property name, so a model object from Get-ShpModel can be piped in directly. Tab-completion offers the ids returned by Get-ShpModelName.

EXAMPLES

EXAMPLE 1

Select-ShpModel claude-opus-4.8

Makes claude-opus-4.8 the default model for subsequent Invoke-Shp calls.

EXAMPLE 2

Select-ShpModel -Model claude-opus-4.8 -ReasoningEffort max -MaxOutputTokens 4000

Sets the default model together with a default reasoning effort and output cap.

EXAMPLE 3

Get-ShpModel -Endpoint Session | Where-Object Id -eq 'gpt-5.5' | Select-ShpModel

Pipes a model object from Get-ShpModel to set it as the default.

EXAMPLE 4

Select-ShpModel -Clear

Resets all session defaults back to unset.

PARAMETERS

-Clear

Reset all session defaults (model, reasoning effort, and max output tokens) back to unset. Cannot be combined with -Model.

Type: SwitchParameter
Parameter Sets: Clear
Aliases:

Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-MaxOutputTokens

Optional default cap on the number of tokens the model may generate in its reply. Omit to leave the limit to the service.

Type: Int32
Parameter Sets: Set
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Model

The model id to make the default for subsequent Invoke-Shp calls. Mandatory in the default (Set) parameter set. Accepts pipeline input by property name and the alias Id, so `Get-ShpModel | ... | Select-ShpModel` works.

Type: String
Parameter Sets: Set
Aliases: Id

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru

Return the resulting defaults object. By default the cmdlet produces no output.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ReasoningEffort

Optional default reasoning (thinking) effort to apply with the model: minimal, low, medium, high, xhigh or max. The set a given model supports varies; the API validates the value at call time. Omit to leave the effort unset (model default).

Type: String
Parameter Sets: Set
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

None by default. With -PassThru, a System.Management.Automation.PSCustomObject

with Model, ReasoningEffort, and MaxOutputTokens members.

NOTES

RELATED LINKS

Get-ShpDefault

Invoke-Shp

Get-ShpModel

Clone this wiki locally