Skip to content

bug: legacy base_url configs are not honored consistently #25

Description

@JNK234

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    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