GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — server: /api/model and /api/provider return an empty catalog while a Location reboots after idle eviction · Issue #51701 · anomalyco/opencode

server: /api/model and /api/provider return an empty catalog while a Location reboots after idle eviction #51701

New issue
Copy link
New issue
Copy link
Closed as duplicate
Closed as duplicate
server: /api/model and /api/provider return an empty catalog while a Location reboots after idle eviction#51701
Copy link
Assignees
nexxeln
Labels
pending closetriaging

Description

@depler
depler
opened on Sep 27, 2026
Issue body actions

Description

After a Location is evicted for inactivity and lazily rebooted, GET /api/model and GET /api/provider return 200 OK with an empty catalog for a short window, before the Location's plugin providers finish registering. The response is indistinguishable from a genuinely empty catalog, so clients consume it as authoritative.

Concrete impact: grinev/opencode-telegram-bot#257 treats the empty snapshot as "model has no image capability" and silently drops an incoming Telegram photo, even though the model supports images. Same class as #36117 (service-restart path) and #35556 (initial empty plugin generation); this report is the idle-eviction trigger with an external SDK client.

Plugins

  • opencode-cmd-provider 2.1.9 (provider commandcode)
  • tps-counter@git+https://github.com/depler/opencode-tps-counter.git

OpenCode version

2.0.18 (opencode serve --service --port 49374, managed service, npm release install)

Steps to reproduce

  1. Run a managed v2 server with at least one plugin provider (opencode-cmd-provider).

  2. Leave a Location idle for more than 60 minutes so it is evicted (sweep runs every minute):

    location services evicted  directory=/opt
    location services evicted  directory=/root
    
  3. Immediately issue the first Location-scoped read, e.g. GET /api/model (or GET /api/provider).

  4. Observe a 200 OK with an empty/partial catalog: {"data": []} (or providers present with zero models).

  5. Poll a few seconds later and observe the correct catalog once the plugin providers register.

Screenshot and/or share link

n/a

Operating System

Ubuntu 24.04, Linux 6.8.0-139-generic (x86_64)

Terminal

n/a — headless systemd service; the client is a Telegram bot using the bundled SDK.

Additional context

Server timeline (MSK = UTC+3, 2026-09-27):

19:20:22.193  location services evicted  directory=/opt
19:20:22.438  location services evicted  directory=/root
19:21:02.915  location services booted   directory=/opt   durationMs=256
19:21:04.386  location services booted   directory=/root  durationMs=1271
19:21:04.396  client GET /api/model -> empty
19:21:07.828  event provider.updated     directory=/root   <- models registered only here

The read returned ~10 ms after location services booted for /root, i.e. ~3.4 s before the plugin's models were registered.

Expected: model/provider reads should not present intermediate initialization state as authoritative — either await catalog readiness (as proposed in #36117) or expose readiness (e.g. 503 / Retry-After, or a ready marker) so a client can distinguish "not ready yet" from "no models".

Eviction cadence observed on this host today: 10:29:50, 12:06:56, 14:02:25, 16:20:22 — each after roughly an hour without activity for that Location.

Activity

  1. github-actions
    assigned
    nexxeln
    on Sep 27, 2026
  2. github-actions
    added
    needs:complianceThis means the issue will auto-close after 2 hours.
    and removed
    needs:complianceThis means the issue will auto-close after 2 hours.
    on Sep 27, 2026
  3. github-actions commented on Sep 27, 2026

    @github-actions
    github-actionsBot
    on Sep 27, 2026 – with GitHub Actions
    Contributor
    More actions

    Thanks for updating the issue with the required description and helpful reproduction and system details!

  4. opencodejr commented on Oct 28, 2026

    @opencodejr
    opencodejrBot
    on Oct 28, 2026
    Contributor
    More actions

    Thanks for the detailed timeline! I think this is a duplicate of #36117. Idle eviction is one more way to cold-boot a Location, and the result is the same race: /api/model and /api/provider answer 200 OK before the plugin providers have registered.

    Possible duplicates and related issues, ordered by likelihood:

    • fix(server): await catalog readiness for model and provider reads #36117: the same bug (catalog reads return an empty or partial snapshot as if it were final while plugins are still activating) and the same proposed fix (wait for catalog readiness). It describes the service-restart trigger.
    • V2: first Location can expose an empty plugin generation #35556: the underlying empty initial plugin generation on a cold Location (closed). Its comments already describe idle eviction and the rebuilt Location bringing the race back.

    Your eviction timeline and the Telegram bot impact would be useful context on #36117. The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.

  5. opencodejr
    added
    pending close
    triaging
    on Oct 28, 2026
  6. opencodejr
    closed this as duplicateon Oct 29, 2026
  7. opencodejr commented on Oct 29, 2026

    @opencodejr
    opencodejrBot
    on Oct 29, 2026
    Contributor
    More actions

    Closing this as a duplicate of #36117. We waited a day for a reply explaining how it differs and didn't get one. Idle eviction is one more way to cold-boot a Location. It hits the same race, where /api/model and /api/provider return 200 OK with an empty or partial catalog before plugin providers have registered. Please follow #36117 for progress. Your eviction timeline and the Telegram bot impact would be useful context there. If your problem turns out to be different, reply here and we can reopen.

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

Metadata

Metadata

Assignees

  • @nexxeln
    nexxeln

Labels

pending closetriaging

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.