mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
This adds experimental support for virtual models. A virtual model is a catalog entry that an extension registers with pi.registerVirtualModel(). It does not talk to a provider itself; for every request it picks a physical model and thinking level. The motivation is to make routing policies pluggable: plan on a strong model and implement on a cheap one, pick a model with a classifier, or move to a larger window when the context grows. Today this needs model switching by hand or hacks in prepareRequest. The selection stays virtual: model_change records it, resume restores it, and each response records the physical model and thinking level that produced it. Router state can be stored on the session branch, so it follows /tree and forks and survives compaction. Context limits, compaction and image sizing use the physical model a request was routed to. examples/extensions/jev-router.ts shows a full router that uses the Jev classifier to pick Sol or Terra for planning and hands off to Luna after the first edit. docs/virtual-models.md describes the API.
204 lines
4.6 KiB
JSON
204 lines
4.6 KiB
JSON
{
|
|
"navigation": [
|
|
{
|
|
"title": "Get Started",
|
|
"items": [
|
|
{
|
|
"title": "Overview",
|
|
"path": "index.md"
|
|
},
|
|
{
|
|
"title": "Quickstart",
|
|
"path": "quickstart.md"
|
|
},
|
|
{
|
|
"title": "How Pi Works",
|
|
"path": "how-pi-works.md"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"title": "Guides",
|
|
"items": [
|
|
{
|
|
"title": "Run Pi",
|
|
"items": [
|
|
{
|
|
"title": "Use Pi in the Terminal",
|
|
"path": "usage.md"
|
|
},
|
|
{
|
|
"title": "Choose a Model",
|
|
"path": "models.md"
|
|
},
|
|
{
|
|
"title": "Manage Sessions and Context",
|
|
"path": "sessions.md"
|
|
},
|
|
{
|
|
"title": "Run Pi Safely",
|
|
"path": "security.md"
|
|
},
|
|
{
|
|
"title": "Isolate Pi",
|
|
"path": "containerization.md"
|
|
},
|
|
{
|
|
"title": "Run Local Models",
|
|
"path": "llama-cpp.md"
|
|
},
|
|
{
|
|
"title": "Configure Your Terminal",
|
|
"path": "terminal-setup.md"
|
|
},
|
|
{
|
|
"title": "Configure Shell Commands",
|
|
"path": "shell-aliases.md"
|
|
},
|
|
{
|
|
"title": "Run Pi in tmux",
|
|
"path": "tmux.md"
|
|
},
|
|
{
|
|
"title": "Run Pi on Windows",
|
|
"path": "windows.md"
|
|
},
|
|
{
|
|
"title": "Run Pi on Android",
|
|
"path": "termux.md"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"title": "Customize Pi",
|
|
"items": [
|
|
{
|
|
"title": "Configure Pi",
|
|
"path": "configuration.md"
|
|
},
|
|
{
|
|
"title": "Create Prompt Templates",
|
|
"path": "prompt-templates.md"
|
|
},
|
|
{
|
|
"title": "Add Skills",
|
|
"path": "skills.md"
|
|
},
|
|
{
|
|
"title": "Create Themes",
|
|
"path": "themes.md"
|
|
},
|
|
{
|
|
"title": "Use Pi Packages",
|
|
"path": "packages.md"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"title": "Build on Pi",
|
|
"items": [
|
|
{
|
|
"title": "Build Extensions",
|
|
"path": "extensions.md"
|
|
},
|
|
{
|
|
"title": "Add Custom Providers",
|
|
"path": "custom-provider.md"
|
|
},
|
|
{
|
|
"title": "Route with Virtual Models",
|
|
"path": "virtual-models.md"
|
|
},
|
|
{
|
|
"title": "Build Terminal UI Components",
|
|
"path": "tui.md"
|
|
},
|
|
{
|
|
"title": "Integrate with the CLI",
|
|
"path": "cli-integration.md"
|
|
},
|
|
{
|
|
"title": "Use the SDK",
|
|
"path": "sdk.md"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"title": "Reference",
|
|
"items": [
|
|
{
|
|
"title": "CLI",
|
|
"path": "cli.md"
|
|
},
|
|
{
|
|
"title": "Slash Commands",
|
|
"path": "slash-commands.md"
|
|
},
|
|
{
|
|
"title": "Settings",
|
|
"path": "settings.md"
|
|
},
|
|
{
|
|
"title": "Environment Variables",
|
|
"path": "environment-variables.md"
|
|
},
|
|
{
|
|
"title": "Keybindings",
|
|
"path": "keybindings.md"
|
|
},
|
|
{
|
|
"title": "Provider Authentication",
|
|
"path": "providers.md"
|
|
},
|
|
{
|
|
"title": "Session File Format",
|
|
"path": "session-format.md"
|
|
},
|
|
{
|
|
"title": "Compaction and Branch Summaries",
|
|
"path": "compaction.md"
|
|
},
|
|
{
|
|
"title": "JSON Event Stream",
|
|
"path": "json.md"
|
|
},
|
|
{
|
|
"title": "RPC Protocol",
|
|
"path": "rpc.md"
|
|
},
|
|
{
|
|
"title": "RPC Commands",
|
|
"path": "rpc-commands.md"
|
|
},
|
|
{
|
|
"title": "RPC Extension UI",
|
|
"path": "rpc-extension-ui.md"
|
|
},
|
|
{
|
|
"title": "Message Types",
|
|
"path": "message-types.md"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"redirects": [
|
|
{
|
|
"from": "development.md",
|
|
"to": "index.md"
|
|
},
|
|
{
|
|
"from": "session.md",
|
|
"to": "session-format.md"
|
|
},
|
|
{
|
|
"from": "tree.md",
|
|
"to": "sessions.md"
|
|
},
|
|
{
|
|
"from": "process-integration.md",
|
|
"to": "cli-integration.md"
|
|
}
|
|
]
|
|
}
|