Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#1,595 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go
領域
ai, api, backend, frontend

調査の方向性

まずモデル一覧エンドポイントとチャットクライアントをたどり、次にプロバイダー設定からチャット補完リクエスト、サイト情報、チャット入力、会話履歴へと追ってください。提案されている3つのプロバイダー拡張とその明記された制限がカバーされていることを、簡潔なupstreamエラーと永続化された画像データなしで確認してください。既存のreasoning-contentのレンダリングパスは引き続き利用可能であるべきです。

索引モデルが issue の本文から書いたものです。

説明

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!

主要言語
Go
スター
15.7k
フォーク
1.4k
平均マージ
1日 20時間
マージ済み PR(30日)
6

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/answer のほかの issue

apache/answer の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。