Add a neutral "Custom OpenAI-compatible" preset for LLM profiles
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start with ConfigFrom for the openai format in the agent package and the generic provider in agent/provider.go, then find where the LLM profile form in System -> LLM sets the format and base URL placeholder. Write the regression test for stripping a trailing /chat/completions first, and add the db profile round-trip test. Done when those tests pass with go test ./... and the frontend preset test passes. The placement of the preset and whether to validate /v1 are still open maintainer questions.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
Users who run a self-hosted or third-party OpenAI-compatible endpoint (a local gateway, a relay/proxy, or a custom model name) must currently pick the generic "openai" format and know the base URL and model conventions themselves. The docs cover this in README ("Base URL gotcha"), but the profile form gives no guided path. Reports of confusion and wrong base URLs (for example, a trailing /v1 or a pasted /chat/completions) are the common failure mode.
Proposal
Add a neutral preset named "Custom OpenAI-compatible" to the LLM profile form in System -> LLM. The preset does three things and nothing more:
- Selects the existing
openaiformat (no new wire format, no schema migration). - Pre-fills an empty base URL placeholder that shows the expected shape (
https://<host>/v1), without a vendor name or a baked endpoint. - Shows a one-line hint that the base must end in
/v1for OpenAI-format endpoints, and that the path/chat/completionsis appended by the provider.
No vendor logos, no vendor-specific environment variables, no promotional content, no hard-coded endpoints. This matches CONTRIBUTING.md ("provider convenience goes in as a neutral preset (name and base URL) or a docs recipe").
Non-goals
- No new wire format and no schema change. This is a form-level preset only.
- No ChatGPT-subscription or session-token auth. Only API-key based endpoints are in scope.
- No automatic model discovery. A user types the model name.
Behavior spec
- Preset is selectable in the profile form. Choosing it sets format to
openaiand fills the base URL placeholder. - Saving with an empty base URL falls back to the existing behavior (the public OpenAI endpoint), so behavior for current profiles is unchanged.
- Trailing
/chat/completionsin the base URL is stripped, asConfigFromalready does foropenai. - Existing profiles are not modified.
Rationale
- Reduces setup errors for any OpenAI-compatible backend without adding vendor-specific code.
- Keeps the generic provider pattern in agent/provider.go intact.
- Scope is one focused change, consistent with the one-change-per-PR rule.
Test plan (TDD: failing test first)
- Unit test (Go, agent package):
ConfigFrom("openai", ...)given a base URL with a trailing/chat/completionsreturns a base URL with it stripped. This already exists in behavior; add a regression test pinning it so the preset cannot regress it. - Profile save/load test (db package): save an
openaiprofile with a custom base URL and a custom model name, reload it, and assert base URL, model, and format round-trip unchanged. - Frontend test: selecting the preset sets format to
openaiand the base URL placeholder; saving an empty base URL does not write a value. - Live connection test: run the existing connection test against a local OpenAI-compatible endpoint and confirm HTTP 200 and a model reply.
Order: write tests 1-3 first, watch them fail, then implement the preset, then watch them pass. Run go vet ./... and go test ./..., and the frontend test suite.
Verification status
Not yet run. This issue is a proposal. The code change has not been written or tested.
Open questions for maintainers
- Should the preset appear only under "Advanced" in the form, or on the main format selector?
- Is a placeholder hint enough, or should the form validate that the base URL ends in
/v1for theopenaiformat?
- Lingua principale
- Go
- Stelle
- 18.7k
- Fork
- 7k
- Merge medio
- 10h 41m
- PR unite (30g)
- 342
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di BaaRai/ARTEX
-
Task retarget keeps the old host in task scope and adds the new host in a form that matches nothingForse già presa @chaitanya0305 l’ha presa oggi. Apertabug P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
BaaRai/ARTEX#652 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
A finding reported with severity "High" is stored as-is, so it is missing from severity counts and min_severity channels drop itForse già presa @chaitanya0305 l’ha presa oggi. Apertabug P2
Difficoltà 3/5 1-2 giorni Idoneità per principianti 22/100
BaaRai/ARTEX#650 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Stateful guard misreads curl flags: `curl -f` GET is refused, `--json` / `-d@file` / `-T` POSTs skip the leaseForse già presa @chaitanya0305 l’ha presa oggi. Apertabug P1
Difficoltà 2/5 1-3 ore Idoneità per principianti 30/100
BaaRai/ARTEX#644 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
question
Difficoltà 4/5 1-2 giorni Idoneità per principianti 20/100
BaaRai/ARTEX#620 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
TrojanApertaquestion
Difficoltà 2/5 1-3 ore Idoneità per principianti 38/100
BaaRai/ARTEX#614 · 1 commento · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di BaaRai/ARTEX
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
compiler-explorer/compiler-explorer#9710 ·
I maintainer di solito rispondono entro 1 giorno
-
Add govulncheck workflowApertaenhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
losisin/helm-values-schema-json#437 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
kubernetes-sigs/controller-runtime#3704 ·
I maintainer di solito rispondono entro 1 giorno