Skip to content

Pi text generation picker offers extension-only models (provider packages, virtual models), so titles silently keep the raw prompt #30360

Open

Description

@astarktc

What happened

The text generation model picker (Settings → Text generation model → Pi) offers models that text generation can never load. When one is chosen, every thread title generation fails and the thread keeps its raw first prompt as the title. The thread and the sidebar show no error; the reason is only in the server trace.

In our case the model is a Pi virtual model (pi.registerVirtualModel, Pi 1.5): a routing extension registers auto/gpt-6-luna, which picks a backend per request. It is the second kind of extension model to hit this, after the provider-package models in #19053.

This is the follow-up @t3dotgg asked for when closing #19053: #19070 fixed the error text, and this issue covers only the part still open, the picker offering extension-only models.

Diagnosis

  • Discovery (makePiDiscoveryConnection, packages/provider-pi/src/server/status.ts) runs Pi with extensions loaded, and its own comment says Pi lists "extension, virtual and --api-key" models. The text generation picker builds its options from that catalog (getCustomModelOptionsByInstance, apps/web/src/modelSelection.ts), and its only filter is per provider (supportsTextGeneration), never per model.
  • Text generation (packages/provider-pi/src/server/textGeneration.ts) runs pi --mode rpc --no-session --no-extensions --no-tools, intentionally (@juliusmarminge in [Bug]: Pi text generation fails for models that a Pi extension adds, even though the model picker offers them #19053). Under --no-extensions neither extension providers nor virtual models exist, so set_model fails.
  • The trace shows each title attempt failing with fix(pi): say why text generation cannot load a model #19070's message: Pi rejected model 'auto/gpt-6-luna': Model not found: auto/gpt-6-luna. If the model comes from a Pi extension or package, text generation cannot use it because it runs Pi with --no-extensions. The message is right, but it reaches only the trace.

Same code path on main 260297b55f.

Steps to reproduce

  1. Install any Pi extension that registers a provider or a virtual model (the demo-provider.ts from [Bug]: Pi text generation fails for models that a Pi extension adds, even though the model picker offers them #19053 works).
  2. In T3 Code, Settings → Text generation model: the extension's model is listed under Pi. Select it.
  3. Start a Pi thread and send a message. The title stays the raw first message, and no error shows in the UI.

The Pi step on its own:

cd "$(mktemp -d)"
echo '{"id":"1","type":"set_model","provider":"auto","modelId":"gpt-6-luna"}' | pi --mode rpc --no-session                                 # success: true
echo '{"id":"1","type":"set_model","provider":"auto","modelId":"gpt-6-luna"}' | pi --mode rpc --no-session --no-extensions --no-tools # Model not found

Version

T3 Code 0.1.6, built from main ac8dce0cc3 (code path unchanged on 260297b55f). Pi 1.5.0.

Environment

macOS (arm64) and Windows 11, four hosts, all affected.

Evidence

  • PiTextGeneration.generateThreadTitle spans in server.trace.ndjson: three attempts per thread, each failing with the Pi rejected model detail above.
  • The same set_model on T3's exact text-generation argv: auto/gpt-6-luna → Model not found; built-in openai/gpt-6-luna → success, and a title is returned.

Related issues

#19053 (extension provider models; closed, its picker part split off to here), #19070 (error text), #23726 (other silent title failures).

Fix applied or workaround

Workaround: pick a built-in or models.json model for text generation. After switching to openai/gpt-6-luna, Regenerate title worked on the first try.

A fix could do either of these:

  • Have discovery mark models as unavailable to --no-extensions launches (for example, a second get_available_models from a --no-extensions probe), and have the picker hide or disable those models for text generation.
  • Reject the selection when saving the setting, with fix(pi): say why text generation cannot load a model #19070's message.

Filed by

@astarktc, with an AI agent (Claude, in Pi via T3 Code). Reproduced and verified by the agent on our hosts.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions