Repository navigation
Get‑ShpModel
Lists Copilot models available at one or more API endpoints.
Get-ShpModel [[-Endpoint] <String>] [[-TokenPath] <String>] [[-GitHubHost] <String>]
[[-EditorVersion] <String>] [[-PluginVersion] <String>] [[-UserAgent] <String>] [[-IntegrationId] <String>]
[[-TimeoutSec] <Int32>] [[-MaxRetryCount] <Int32>] [[-RetryDelaySec] <Int32>]
[[-NetworkOutageToleranceSec] <Int32>] [<CommonParameters>]
Obtains a session token, then queries the /models endpoint for each selected base URL and emits one object per model (Endpoint, Id, ServiceType, and the Raw model record). Endpoints that fail to respond produce a warning rather than terminating the call.
Each model's advertised context window and output cap are also recorded in a module-scoped cache as a side effect. That cache is what lets the context-window guard in Invoke-Shp size itself from the model in use without issuing a request of its own, so calling this cmdlet once per session makes every later turn's guard fire at the right point instead of at the built-in fallback. The cache is discarded by Initialize-Shp on re-auth and is never persisted to disk.
Get-ShpModel
Lists the models available at the Enterprise endpoint.
Get-ShpModel -Endpoint All | Sort-Object Id
Lists models across every known endpoint, sorted by id.
Editor-Version header value sent with the request.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: $script:DefaultEditorVersion
Accept pipeline input: False
Accept wildcard characters: FalseWhich endpoint(s) to query: Enterprise, Individual, Default, Session (the per-account endpoint from the session token), or All. Default: Enterprise.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: Enterprise
Accept pipeline input: False
Accept wildcard characters: FalseHTTPS GitHub.com or Enterprise Cloud GHE.com authentication origin. Explicit value wins over Session context and SHELLPILOT_GITHUB_HOST. For an enterprise host every endpoint selection uses the service-returned per-account API endpoint. An absent endpoint is refused, never guessed or replaced with the GitHub.com fallback map. An explicit host lookup does not populate the shared session model-limit cache. To warm that cache, set GitHubHost through Set-ShpContext and call Get-ShpModel without a per-call host override.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseCopilot-Integration-Id header value sent with the request.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: $script:DefaultIntegrationId
Accept pipeline input: False
Accept wildcard characters: FalseMaximum retries on a transient (429/5xx) HTTP failure. Falls back to the session context and then the built-in default.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 9
Default value: 0
Accept pipeline input: False
Accept wildcard characters: FalseWall-clock budget, in seconds, for riding out a connection-level network outage. Falls back to the session context and then the built-in default. 0 disables outage tolerance.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 11
Default value: 0
Accept pipeline input: False
Accept wildcard characters: FalseEditor-Plugin-Version header value sent with the request.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: $script:DefaultPluginVersion
Accept pipeline input: False
Accept wildcard characters: FalseBase delay in seconds for the exponential backoff between retries. Falls back to the session context and then the built-in default.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 10
Default value: 0
Accept pipeline input: False
Accept wildcard characters: FalsePer-request HTTP timeout in seconds. Falls back to the session context (Set-ShpContext) and then to the built-in default of 0, meaning no explicit timeout.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Default value: 0
Accept pipeline input: False
Accept wildcard characters: FalsePath to an OAuth token file to authenticate with. Omit it to resolve the token by the module's precedence: the session context (Set-ShpContext -GitHubToken), then $env:SHELLPILOT_GITHUB_TOKEN, then the default token file written by Initialize-Shp.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseUser-Agent header value sent with the request.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: $script:DefaultUserAgent
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
- Clear-ShpChat
- Clear-ShpContext
- Clear-ShpRedactionPolicy
- Clear-ShpToolPolicy
- Clear-ShpUsage
- Compress-ShpChat
- ConvertTo-ShpAnnotation
- ConvertTo-ShpOtelTrace
- ConvertTo-ShpTokenCount
- Get-ShpChat
- Get-ShpChatCheckpoint
- Get-ShpContext
- Get-ShpContextReport
- Get-ShpCosineSimilarity
- Get-ShpCostEstimate
- Get-ShpDefault
- Get-ShpMcpServer
- Get-ShpModel
- Get-ShpModelName
- Get-ShpRedactionPolicy
- Get-ShpTool
- Get-ShpToolPolicy
- Get-ShpUsage
- Initialize-Shp
- Invoke-Shp
- Invoke-ShpBatch
- Invoke-ShpEval
- Invoke-ShpSubagent
- Register-ShpMcpServer
- Register-ShpTool
- Request-ShpEmbedding
- Resolve-ShpError
- Restore-ShpChat
- Save-ShpChat
- Select-ShpModel
- Set-ShpContext
- Set-ShpRedactionPolicy
- Set-ShpToolPolicy
- Start-ShpChat
- Test-ShpCiReadiness
- Unregister-ShpMcpServer
- Unregister-ShpTool