Pi: paused model calls are reported as "not signed in" when the model's provider comes from an extension

Open Beginner friendly
#288 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@balcsida is already working on this.

Since Nov 20, 2026.

  • #289 by @balcsida — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
73/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
python

Research direction

Start by locating the Pi session start notice and the Pi-related te doctor output, then read the code that builds those messages and handles sidecall.py sign-in detection. Update both messages to name pi_extensions and pi_cli; the issue is done when users can find those settings from either message. The reporter plans to open a PR, so check for linked work before starting.

Written by the indexing model from the issue text.

Description

On Pi, the plugin's model calls get paused as "not signed in" when Pi is signed in, but the model's provider comes from an extension:

TokenEconomizer: the plugin's own model calls go through `pi -p`, which answered that it is not signed in, so they are paused; facts that need no model call are still learned, and the loop guard redirects only at its backstop. `/te config set microskills=on` (or `loopguard=on`) tries again.

The calls run with --no-extensions, so the provider is not registered in them and Pi (1.5.2) answers:

No API key found for the selected model.

Use /login to log into a provider via OAuth or API key. See:
  <docs>/providers.md
  <docs>/models.md

/login matches _SIGNED_OUT_RE in sidecall.py, so the calls are paused, and both the session start notice and te doctor say that Pi is not signed in. config set microskills=on only pauses them again at the next call.

The settings from #96 fix it (pi_extensions, and pi_cli as well in my case, since the first pi on my PATH is a wrapper), but nothing in the notice or in te doctor points to them. errors.log did not help either: the 300 characters it keeps were the two docs paths and the session header from stdout, so the "No API key found" line was cut off.

I'd suggest naming pi_extensions and pi_cli in the Pi notice and in the doctor line. I'll open a PR for that.

A side note: Pi writes "for the selected model" only when it does not know the provider, otherwise it names it (No API key found for ${provider}.). So the two cases could be told apart if you prefer a more precise message.

Seen on main (1bfeccd) with Pi 1.5.2 on macOS.

Dominant language
Python
Stars
7.4k
Forks
500
Avg merge
1d 9h
Merged PRs (30d)
124

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/TokenEconomizer

All issues in microsoft/TokenEconomizer

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.