mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
fix: llama.cpp guidance as no default (#8236)
This commit is contained in:
parent
374e56e553
commit
a1bc0ec790
3 changed files with 13 additions and 1 deletions
|
|
@ -8,6 +8,7 @@
|
|||
- Fixed Z.AI Coding Plan defaults referencing the removed GLM-5.1 model ([#8096](https://github.com/earendil-works/pi/issues/8096)).
|
||||
- Fixed repeated ambiguous truncated-response recovery being mislabeled as context overflow ([#8130](https://github.com/earendil-works/pi/issues/8130)).
|
||||
- Fixed duplicate fullscreen right-click paste in VS Code-based terminals on Windows ([#8186](https://github.com/earendil-works/pi/issues/8186)).
|
||||
- Fixed llama.cpp login guidance to direct users to `/llama` before `/model` when no local models are loaded ([#8203](https://github.com/earendil-works/pi/issues/8203)).
|
||||
|
||||
## [0.84.2] - 2026-08-14
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@ Start Pi and configure the provider:
|
|||
|
||||
Enter the router URL and optional API key. The default URL is `http://127.0.0.1:8080`.
|
||||
|
||||
If you start the router with `--no-models-autoload`, `/login llama.cpp` only stores the connection. Run `/llama` to load a model, then `/model` to select the loaded model for the current session.
|
||||
|
||||
Environment variables can configure the same values without `/login`:
|
||||
|
||||
```bash
|
||||
|
|
|
|||
|
|
@ -257,6 +257,12 @@ function hasDefaultModelProvider(providerId: string): providerId is keyof typeof
|
|||
return providerId in defaultModelPerProvider;
|
||||
}
|
||||
|
||||
function llamaCppPostLoginGuidance(actionLabel: string, loadedModelCount: number): string {
|
||||
return loadedModelCount === 0
|
||||
? `${actionLabel}. No llama.cpp models are loaded. Use /llama to load a model, then /model to select it.`
|
||||
: `${actionLabel}. Use /model to select a loaded llama.cpp model, or /llama to manage models.`;
|
||||
}
|
||||
|
||||
type LoginProviderCompletionOption = {
|
||||
id: string;
|
||||
name: string;
|
||||
|
|
@ -5471,7 +5477,10 @@ export class InteractiveMode {
|
|||
if (isUnknownModel(previousModel)) {
|
||||
const availableModels = this.session.modelRuntime.getAvailableSnapshot();
|
||||
const providerModels = availableModels.filter((model) => model.provider === providerId);
|
||||
if (!hasDefaultModelProvider(providerId)) {
|
||||
// Matches LLAMA_PROVIDER_ID from extensions/llama/provider.ts; kept inline to avoid coupling interactive mode to the built-in extension.
|
||||
if (providerId === "llama.cpp") {
|
||||
selectionError = llamaCppPostLoginGuidance(actionLabel, providerModels.length);
|
||||
} else if (!hasDefaultModelProvider(providerId)) {
|
||||
selectionError = `${actionLabel}, but no default model is configured for provider "${providerId}". Use /model to select a model.`;
|
||||
} else if (providerModels.length === 0) {
|
||||
selectionError = `${actionLabel}, but no models are available for that provider. Use /model to select a model.`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue