Skip to content

feat(llm): resolve model endpoints from a model catalog - #297

Open
agicy wants to merge 10 commits into
syswonder:devfrom
agicy:llm-catalog
Open

agicy wants to merge 10 commits into
syswonder:devfrom
agicy:llm-catalog

Conversation

@agicy

@agicy agicy commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Robonix's model consumers each duplicate endpoint, model, key and feature assumptions. There is no single source of truth for what a model supports, so changing a model means editing every consumer and feature mismatches surface only at runtime.

User-visible impact

A deployment can set ROBONIX_LLM_CATALOG to one YAML/JSON catalog. Each consumer resolves its endpoint from feature and budget requirements at startup, then connects to the provider directly. Without the variable every consumer keeps its existing VLM_*/manifest path; rollout is per service and rollback is unsetting the variable.

Implementation

  • Python: robonix_api.llm in pylib/robonix-api; Rust: system/llm-catalog.
  • ModelCatalog: validated YAML/JSON ModelSpec list (endpoint, model, api_key_env, features, context, p95 latency, prices, protocol); api_key_env is a variable name, never a key.
  • Resolver: hard feature filter → context/latency/cost filter → rank (latency, price, id) → best-first ModelSpec[]. json_schema falls back to json_object only when no strict candidate fits and marks targets downgraded=true.
  • Same operations in both languages: ModelCatalog.load, ModelCatalog.model, ModelCatalog.resolve, Requirements.default, resolve_from_env, api_key_for.
  • Pilot: catalog selects the VLM endpoint; default features vision,tools,stream; ROBONIX_LLM_* overrides budgets.
  • Opt-in consumers: Scene (vision), Memory (json_object / vision), Memsearch (text), VLM Verifier (vision, covering the new before/after and multi-camera paths through the shared VlmConfig.parse), and CI scripts. All keep the legacy path when the catalog is unset.
  • No service, proxy, port or request hop; consumers connect directly.

Validation

  • PYTHONPATH=pylib/robonix-api python3 -m unittest discover -s pylib/robonix-api/tests -p 'test_llm_*.py' → 18 passed
  • Scene focused CI (pytest/numpy/scipy/httpx/Pillow only): 63 passed, 5 skipped; second group 29 passed
  • Memory: 14 + 8 passed; Memsearch: 2 passed; Scene catalog: 1 passed
  • VLM Verifier: 33 passed after rbnx codegen -p services/verifiers/vlm_verifier --mcp
  • Rust: cargo test -p robonix-llm-catalog 3 passed; cargo test -p robonix-pilot 111 passed; cargo test -p robonix-cli 36 passed
  • Catalog-only boot (VLM_* unset, only ROBONIX_LLM_CATALOG + provider key): rbnx preflight skipped, Pilot resolved vlm=catalog
  • cargo fmt --check, cargo clippy ... -D warnings, cargo metadata --locked, uv lock --check: clean
  • Webots office smoke: all components ACTIVE; quick ask OK; exploration produced 41 objects / 75 relations; Pilot 2 requests, 22,281 input / 1,237 output, 81% cache
  • DeepSeek two-image smoke: red, blue; simulation shut down with no robonix containers and GPUs back to 1 MiB

Configuration and migration

  • ROBONIX_LLM_CATALOG — absolute catalog path; unset means legacy behavior.
  • ROBONIX_LLM_FEATURES — Pilot's required model features; defaults to vision,tools,stream.
  • Keys are read by consumers from each target's api_key_env; Core never stores keys.
  • No new capability contracts, generated code, ports, processes or Python dependencies; uv.lock is unchanged.
  • Rollout is per service; rollback is unsetting the variable.

Related issues

None.

Screenshots / terminal output

No CLI, TUI or web UI changes.

@github-actions github-actions Bot added type:feature New feature (feat:) comp:pilot system/pilot comp:scene system/scene comp:memory services/memsearch comp:docs docs/ and READMEs and removed type:feature New feature (feat:) labels Oct 25, 2026
@github-actions github-actions Bot added the comp:api pylib/robonix-api label Oct 27, 2026
@agicy
agicy marked this pull request as ready for review October 31, 2026 06:51


@dataclass(frozen=True)
class Catalog:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe ModelCatalog? Since we use catalog for capabilities before

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. I'll rename it to ModelCatalog in both Python and Rust to avoid confusion with the capability catalog.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed.

"base_url": "http://127.0.0.1:8000/v1",
"model": "Qwen2.5-VL-7B-Instruct-AWQ",
"api_key_env": "VLLM_API_KEY",
"capabilities": {

@enkerewpo enkerewpo Nov 1, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please don’t use capabilities here and also in other code structures, since we used it as our skill/service/primitive interface. Maybe use feature

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed.

@github-actions github-actions Bot added the comp:rbnx tools/rbnx label Nov 1, 2026
@agicy agicy changed the title feat(llm): select model endpoints from a capability catalog feat(llm): resolve model endpoints from a model catalog Nov 1, 2026

This branch has not been deployed

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

Labels

comp:api pylib/robonix-api comp:docs docs/ and READMEs comp:memory services/memsearch comp:pilot system/pilot comp:rbnx tools/rbnx comp:scene system/scene type:feature New feature (feat:)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants