Skip to content

feat: add configurable remote engine API URL for embedding requests#5

Open
neotty wants to merge 1 commit intosqliteai:mainfrom
neotty:rui-dev-API_URL
Open

feat: add configurable remote engine API URL for embedding requests#5
neotty wants to merge 1 commit intosqliteai:mainfrom
neotty:rui-dev-API_URL

Conversation

@neotty
Copy link
Copy Markdown

@neotty neotty commented Apr 27, 2026

This merge request makes the remote embedding API endpoint configurable at build time, instead of being hardcoded in source.

What changed

  • Added a new Makefile variable: REMOTE_ENGINE_API_URL
  • Wired REMOTE_ENGINE_API_URL into compilation defines as DBMEM_REMOTE_API_URL
  • Updated remote embedding code to use DBMEM_REMOTE_API_URL
  • Kept a safe default endpoint when no override is provided
  • Updated build help and vars output to expose the new configuration value

How to use

Validation

  • Verified Makefile variables output includes REMOTE_ENGINE_API_URL
  • Verified overridden REMOTE_ENGINE_API_URL is propagated into compiler defines
  • No new diagnostics reported in modified files

Co-authored-by: Copilot <copilot@github.com>
Copilot AI review requested due to automatic review settings April 27, 2026 01:55
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR makes the remote embedding endpoint configurable at build time by introducing a Makefile variable that is propagated into the C compilation defines, replacing the previously hardcoded URL in the remote embedding implementation.

Changes:

  • Added REMOTE_ENGINE_API_URL Makefile variable (with a default) and exposed it in help/vars output.
  • Propagated REMOTE_ENGINE_API_URL into compilation defines as DBMEM_REMOTE_API_URL.
  • Updated the remote embedding code to use DBMEM_REMOTE_API_URL with an in-source fallback default.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/dbmem-rembed.c Uses DBMEM_REMOTE_API_URL (with a fallback default) instead of a hardcoded endpoint for remote embedding requests.
Makefile Adds REMOTE_ENGINE_API_URL, prints it in help/vars, and passes it to the compiler as -DDBMEM_REMOTE_API_URL=....

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Makefile

ifeq ($(OMIT_REMOTE_ENGINE),0)
C_SOURCES += $(SRC_DIR)/dbmem-rembed.c
override DEFINES += -DDBMEM_REMOTE_API_URL=\"$(REMOTE_ENGINE_API_URL)\"
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

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

This line starts with a tab character while in a top-level ifeq block (not inside a recipe). In GNU Make, a leading tab is treated as a recipe line and will error with “recipe commences before first target”. Remove the leading tab and align indentation with the surrounding variable assignments (spaces only).

Suggested change
override DEFINES += -DDBMEM_REMOTE_API_URL=\"$(REMOTE_ENGINE_API_URL)\"
override DEFINES += -DDBMEM_REMOTE_API_URL=\"$(REMOTE_ENGINE_API_URL)\"

Copilot uses AI. Check for mistakes.
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