Skip to content

fix(openviking): plugin uses non-existent API endpoints, browse/read tools broken #4740

@catbusconductor

Description

@catbusconductor

Bug Description

The OpenViking memory provider plugin (plugins/memory/openviking/__init__.py) uses API endpoints that don't exist on the actual OpenViking server, causing viking_browse and viking_read tool calls to fail.

Issues

1. Wrong endpoint paths and HTTP methods

Tool Current (broken) Correct
viking_browse POST /api/v1/browse GET /api/v1/fs/ls?uri= / GET /api/v1/fs/tree?uri=
viking_read (abstract) POST /api/v1/read/abstract GET /api/v1/content/abstract?uri=
viking_read (read) POST /api/v1/read GET /api/v1/content/read?uri=
viking_read (overview) POST /api/v1/read GET /api/v1/content/overview?uri=

2. Wrong response parsing

  • result.get("children", 0) → API returns a list, should be len(result)
  • e.get("is_dir") → API uses camelCase: e.get("isDir")
  • result.get("content", "") → content endpoints return the string directly

3. Missing auth headers for trusted mode

The _VikingClient doesn't send X-OpenViking-Account or X-OpenViking-User headers, which are required when the server runs in auth_mode: trusted.

4. Background threads don't propagate auth

Client instances created in background threads (search, sync, write) only receive (endpoint, api_key) but not the account/user headers.

Steps to Reproduce

  1. Set up OpenViking server with auth_mode: trusted
  2. Configure memory.provider: openviking in Hermes
  3. Try viking_browse viking:// → fails with 404 or method not allowed
  4. Try viking_read on any URI → fails similarly

Environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/pluginsPlugin system and bundled pluginssweeper:implemented-on-mainSweeper: behavior already present on current maintype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions