Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Feature clarification: AI provider enhancements — thinking mode, vision image input, and API host normalization

Aperta
#1,595 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go
Ambito
ai, api, backend, frontend

Direzione di ricerca

Inizia tracciando l’endpoint di elenco dei modelli e il client di chat, quindi segui le impostazioni del provider fino alle richieste di chat completion, alle informazioni sul sito, all’input della chat e alla cronologia delle conversazioni. Verifica che i tre miglioramenti proposti per i provider e i limiti indicati siano coperti, con errori upstream concisi e senza dati immagine persistiti; il percorso di rendering esistente del contenuto di ragionamento dovrebbe rimanere utilizzabile.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Background

We run a self-hosted Apache Answer as a community FAQ site, with an
OpenAI-compatible LLM gateway (SenseNova). While integrating the AI feature we
hit three concrete gaps. Following @LinkinStars's suggestion on #1594, this
issue clarifies the proposed feature set before the PR is resubmitted.

Proposed enhancements

1. API host normalization (bugfix)

The admin AI settings accept an "API host", but the model-listing endpoint
concatenates api_host + "/v1/models" while the chat client auto-appends
/v1. A base URL that already contains /v1 — the normal convention for
OpenAI-compatible gateways (SenseNova, SiliconFlow, OneAPI relays, vLLM,
SGLang...) — therefore produces /v1/v1/models and fails with the gateway's
NOT_FOUND error, which is passed through to the UI verbatim.

Proposal: a shared NormalizeAPIHost() helper (trim whitespace/trailing
slashes, append /v1 when missing, keep /v1beta/* endpoints intact) used by
both code paths, plus concise upstream error summaries instead of echoing raw
response bodies.

2. Per-provider thinking mode switch

Reasoning-capable models are increasingly common (DeepSeek V4, Qwen3,
SenseNova, ...). Proposal: an admin switch per AI provider that injects the
OpenAI-compatible enable_thinking: true flag into chat completion requests.
The existing reasoning_content streaming/rendering path already displays the
thought process, so no front-end change is required for display.

3. Per-provider vision (image input) switch

Proposal: an admin switch enabling image attachments in AI conversations —
up to 4 PNG/JPEG/WebP images (≤4 MB decoded each) sent as base64 data URLs or
HTTPS links, converted to MultiContent parts. The switch is exposed via site
info (ai_vision_enabled) so the chat input only shows the attach button for
vision-capable providers. History records keep a textual placeholder instead
of persisting image data, so no DB schema change is needed.

Scope / non-goals
  • No new provider protocols (OpenAI-compatible only); Anthropic removed from
    the default provider list since the backend speaks the OpenAI protocol.
  • No multi-provider routing or per-user model selection.
  • No persistence of image attachments in conversation history.
Related
  • #1594 (will be closed and resubmitted referencing this issue).
  • Regarding the security reminder in #1594: the flagged constant was the base64
    of a standard 1×1-pixel PNG placeholder used in a unit test, not a credential.
    To avoid any misreading, the test now constructs the image at runtime from its
    signature bytes and the source contains no base64 blob.

Happy to hear feedback on the scope before resubmitting. Thanks!

Lingua principale
Go
Stelle
15.7k
Fork
1.4k
Merge medio
1g 20h
PR unite (30g)
6

Preparare l'ambiente

Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/answer

Tutte le issue di apache/answer

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.