Skip to content

feat: enable custom openai endpoints for services like opper.ai - #16

Merged
hlubek merged 2 commits into
networkteam:mainfrom
Format-D:feat/llm-endpoint
Sep 21, 2026
Merged

hlubek merged 2 commits into
networkteam:mainfrom
Format-D:feat/llm-endpoint

Conversation

@bweinzierl

@bweinzierl bweinzierl commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Needs networkteam/gollm#1 first, otherwhise it breaks.

RetriggerConfidence Score: 4/5

The PR is not safe to merge until the pinned gollm dependency is updated to a revision that provides SetOpenAIEndpoint.

Findings

  1. P1 Pinned dependency lacks new API ▶
Fix with agent prompt
### Issue 1
internal/llm/gollm/gollm.go:91
This calls `upstream.SetOpenAIEndpoint`, but the module replacement remains pinned to the earlier immutable `f6f84ac83bb5` revision. The PR description says `networkteam/gollm#1` is required, but merging that upstream PR cannot alter this pinned version. Unless `go.mod` and `go.sum` are updated to a revision containing the API, the project will fail to compile with an undefined symbol.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

This PR adds configurable base URLs for OpenAI-compatible LLM services.

  • Adds llm.endpoint to the configuration model and layered merge behavior.
  • Passes custom OpenAI endpoints to the gollm adapter.
  • Adds wire-level request coverage and gateway configuration documentation.
  • The required gollm dependency revision is not included, leaving the branch unable to compile against its pinned dependency.

Reviews (1) · Last reviewed commit: "feat: enable custom openai endpoints for..."

}

if cfg.Provider == "openai" && cfg.Endpoint != "" {
opts = append(opts, upstream.SetOpenAIEndpoint(cfg.Endpoint))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Pinned dependency lacks new API

This calls upstream.SetOpenAIEndpoint, but the module replacement remains pinned to the earlier immutable f6f84ac83bb5 revision. The PR description says networkteam/gollm#1 is required, but merging that upstream PR cannot alter this pinned version. Unless go.mod and go.sum are updated to a revision containing the API, the project will fail to compile with an undefined symbol.

Prompt To Fix With AI
This is a comment left during a code review.
Path: internal/llm/gollm/gollm.go
Line: 91

Comment:
**Pinned dependency lacks new API**

This calls `upstream.SetOpenAIEndpoint`, but the module replacement remains pinned to the earlier immutable `f6f84ac83bb5` revision. The PR description says `networkteam/gollm#1` is required, but merging that upstream PR cannot alter this pinned version. Unless `go.mod` and `go.sum` are updated to a revision containing the API, the project will fail to compile with an undefined symbol.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

updated, please review again

@hlubek

hlubek commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

networkteam/gollm#1 is merged, with two follow-ups on generate-with-usage:

  • 45b9a69 — a struct without an OpenAIEndpoint field no longer skips the OpenAI key check (reflect renders the missing field as "<invalid Value>", which read as a configured endpoint)
  • aa9e2d1 — the endpoint is validated as a URL, so a typo like a missing scheme fails at NewLLM with the field named rather than at the first request

To unblock this branch, bump the pin:

replace github.com/teilomillet/gollm => github.com/networkteam/gollm v0.0.0-20260919121334-aa9e2d1faebc

That is all the P1 above amounts to — the ordering your description already calls out, not a defect in the change.

The rest reads well: it mirrors the existing embed.endpoint shape, gates on the provider, merges in the overlay, and the wire test pins the request path rather than just the config. The README note about rate_limit_rps assuming OpenAI's tier-1 ceilings is a good catch.

@hlubek

hlubek commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

@bweinzierl Thx, the gollm PR for the fork is merged. Can you update the pinned version for this PR?

@hlubek
hlubek merged commit 05fe2f3 into networkteam:main Sep 21, 2026
3 checks passed
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