NetLogo / NetLogo/Netlogo-LLM-Extension

bug: legacy `base_url` configs are not honored consistently

Open
#25 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Scala
Stars
1
Forks
0
Avg merge
3d 1h
Merged PRs (30d)
4

Description

Problem

The extension documentation says legacy base_url is still supported as a generic alias for provider endpoints, but the runtime only uses provider-specific base URL keys in several critical paths.

Observed behavior

Request path ignores generic base_url
  • BaseHttpProvider.sendChatRequest() resolves the endpoint from baseUrlConfigKey only.
  • OpenAIProvider, ClaudeProvider, and GeminiProvider therefore ignore base_url= unless a provider-specific key is also present.
Ollama readiness and request paths disagree
  • LLMExtension.isOllamaReachable() resolves ollama_base_url or base_url, but then writes the resolved value back to ConfigStore.BASE_URL.
  • OllamaProvider.checkServerConnection() and OllamaProvider.listInstalledModels() only read ollama_base_url.
  • This means the readiness check, provider-status output, and actual request path can disagree depending on which key the user set.

Why this matters

The docs and sample configs currently encourage base_url in multiple places. Users can follow the documented config format and still hit the wrong endpoint, especially with Ollama or custom/OpenAI-compatible deployments.

This is more than a documentation mismatch:

  • a config can validate against one URL and send requests to another
  • provider-status can report a different Ollama target than the actual provider uses
  • legacy configs that should remain backward-compatible are effectively broken

Affected code

  • src/main/providers/BaseHttpProvider.scala
  • src/main/providers/OllamaProvider.scala
  • src/main/LLMExtension.scala
  • docs/CONFIGURATION.md
  • docs/USAGE.md
  • demos/config

Suggested fix directions

  1. Normalize generic keys to provider-specific keys when loading config.
  2. Or make every provider explicitly fall back from provider-specific URL to generic base_url.
  3. Use the same resolution path for readiness checks, provider-status, and actual request dispatch.
  4. Update docs/examples to match whichever behavior is kept.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start by tracing URL resolution in src/main/providers/BaseHttpProvider.scala, src/main/providers/OllamaProvider.scala, and src/main/LLMExtension.scala, then compare the affected examples in docs/CONFIGURATION.md, docs/USAGE.md, and demos/config. Establish one resolution path for generic and provider-specific keys across readiness, status, and requests, and update the documentation and examples so they describe the resulting behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
api, backend, documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.