Skip to content

Conversation

@meanderingstream
Copy link
Contributor

Description

The LLM_DB module has a change that allows setting a base_url in the Model. This change uses the model base_url value instead of the provider base_url value. The documentation change in LLM_DB should meet the ReqLLM documentation needs.

In Options.process, a model base_url value overrides the provider base_url.

This change allows users to specify more than one model served by a local OpenAI API compatible server like vLLM, ollama, llama.cpp, etc. Some locally hosted language model servers require one port per model. This change allows the definition of where the model is served on a per model basis.

config :llm_db,
 custom: %{
   vllm: [
     name: "Local Chat Provider",
     env: ["VLLM_API_KEY"],
     models: %{
       "SmolLM2-135M-Instruct" => 
         %{ capabilities: %{chat: true},
            base_url: "http://localhost:8000/v1"
         },
       "custom-domain-specific-model" =>
           %{ capabilities: %{chat: true},
            base_url: "http://localhost:8001/v1"
         }
      }
   ]
}

Type of Change

  • Bug fix (non-breaking change fixing an issue)
  • New feature (non-breaking change adding functionality)
  • Breaking change (fix or feature causing existing functionality to change)
  • Documentation update

Breaking Changes

Testing

  • Tests pass (mix test)
  • Quality checks pass (mix quality)

Checklist

  • My code follows the project's style guidelines
  • I have updated the documentation accordingly
  • I have added tests that prove my fix/feature works
  • All new and existing tests pass
  • My commits follow conventional commit format
  • I have NOT edited CHANGELOG.md (it is auto-generated by git_ops)

Related Issues

Closes #

mix.lock Outdated
"jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"},
"jsv": {:hex, :jsv, "0.16.0", "b29e44da822db9f52010edf9db75b58f016434d9862bd76d18aec7a4712cf318", [:mix], [{:abnf_parsec, "~> 2.0", [hex: :abnf_parsec, repo: "hexpm", optional: false]}, {:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}, {:idna, "~> 6.1", [hex: :idna, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:nimble_options, "~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:poison, ">= 3.0.0 and < 7.0.0", [hex: :poison, repo: "hexpm", optional: true]}, {:texture, "~> 0.3", [hex: :texture, repo: "hexpm", optional: false]}], "hexpm", "a4b2aaf5f62641640519da5de479e5704f6f7c8b6e323692bf71b4800d7b69ee"},
"llm_db": {:hex, :llm_db, "2026.1.1", "d901590ff7d95cdb0808354d3f623b77eb6ca0bd166967f4772333780f35c842", [:mix], [{:deep_merge, "~> 1.0", [hex: :deep_merge, repo: "hexpm", optional: false]}, {:dotenvy, "~> 1.1", [hex: :dotenvy, repo: "hexpm", optional: false]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}, {:req, "~> 0.5", [hex: :req, repo: "hexpm", optional: false]}, {:toml, "~> 0.7", [hex: :toml, repo: "hexpm", optional: false]}, {:zoi, "~> 0.10", [hex: :zoi, repo: "hexpm", optional: false]}], "hexpm", "d5f2eb52f59dbd96fe3a14e8230f901e341e5932cb72990f2077b51011a5ea68"},
"llm_db": {:git, "https://github.com/meanderingstream/llm_db", "027496fa1b7a7bc283f8cc59ff08f8218851b972", [branch: "support_model_specific_branches"]},
Copy link
Contributor

@vkryukov vkryukov Jan 27, 2026

Choose a reason for hiding this comment

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

This is probably not the best idea :). I understand the challenges of developing a patch to req_llm that depends on another patch to llm_db (tests might fail without it etc.), but we just need to point to the latest llm_db and assume that @mikehostetler will merge the PRs in a correct order.

Copy link
Contributor Author

@meanderingstream meanderingstream Jan 28, 2026

Choose a reason for hiding this comment

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

The tests fail when the mix doesn't point at the PR's branch. It also allows use by Elixir apps while waiting for the PRs to be merged. The mix can be changed once the LLM_DB is merged.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Required LLM_DB changes have been merged and a tag created. Bumping llm_db mix dependency to 2026.1

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants