NetLogo / NetLogo/Netlogo-LLM-Extension
feat: update model lists and defaults without a Scala change
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 1
- Forks
- 0
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 4
Description
Problem
Keeping up with provider model churn currently requires a Scala change and a release. Two provider families broke within about five months (see #62), and one broke with no published notice at all — so this will keep happening.
Some of the machinery already exists, but not enough of it:
What works today. ModelRegistryLoader reads models-override.yaml (or .yml) from the NetLogo model directory and completely replaces the bundled section for each provider it names (ModelRegistryLoader.scala:68-71, mergeConfigs at :101-108). A user can correct a stale model list without touching the extension.
What does not. Two gaps make that insufficient:
- The override is per-model-directory. Every user, in every model folder, needs their own copy. There is no user-level or global override location, so a fix cannot be shared or applied once.
- Defaults are compiled in.
defaultModellives inProviderRegistrations.scala(:51anthropic,:79gemini,:107ollama). No YAML file can change them. Sollm:set-provider "gemini"with no explicit model still selects a dead model even when the registry has been corrected — which is exactly the failure in #62.
Possible directions
- A user-level override path — e.g.
~/.netlogo-llm/models.yaml, consulted after the bundled registry and before the model-directory override. One edit fixes every model on the machine. - Move defaults into
models.yaml. Adefault:key per provider section, with the descriptor value used only as a last-resort fallback. Then a data-only edit fixes both the list and the default. - Query the provider's live model list. Most providers expose one (
GET /v1/models, Gemini'smodels?key=). Could backllm:list-models, or refresh a cache on demand via a primitive. Caveat: the list endpoint is not always truthful — Gemini's returnsgemini-2.5-flashfor keys that then get a 404 ongenerateContent, so a live list alone would not have prevented #62. - Ship a fetch script in the repo that regenerates
models.yamlfrom provider APIs, so updating the bundle is a data commit rather than a code change.
Open questions
- Is a global override the right layer, or does per-model-directory scoping matter for reproducibility (a shared
.nlogoxpinning its own model list)? - If defaults move to YAML, what happens when a user override omits
default:— fall back to the descriptor, or the first model listed? - Should a live query ever run automatically, or only on an explicit primitive? Automatic network calls at load time would be surprising in a classroom with no connectivity.
- #29 (registry state leaks across model directories) touches the same loader and should probably be resolved alongside this.
Related
- #62 — the stale-registry incident that motivates this
- #29 — model override registry leaks across model directories
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading ModelRegistryLoader.scala, especially the loading and mergeConfigs sections, then inspect the defaultModel declarations in ProviderRegistrations.scala and the existing models-override.yaml flow. A decision is still needed among user-level overrides, YAML defaults, live provider queries, and a fetch script; done means the chosen design updates model lists and defaults without a Scala change, with its fallback and scoping behavior defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100