Files
hack/tools/scripts/llm-key-hunter/results/_cache/content/beilusaiying_always-accompany.json
T
OpenCode 68a9071cf1 feat: reconcile local master with origin (exa/hot-platform hunters, leaks ledger, latest results)
Local branch had diverged from origin/master (sibling commits on the same base). Rewrote local history linearly on top of origin/master, folding in all local content: exa/hot-platform discovery hunters, leaks ledger, nightly sweep orchestrator, updated .gitignore and skill docs, plus the latest hunt output and vault state. Remote-only files (vault keys, channel scripts) were restored rather than dropped, so the resulting tree is a full union of both sides.
2026-08-07 12:53:47 +08:00

1 line
58 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{"repo": "beilusaiying/always-accompany", "files": {"site/wiki/locales/en/ai-service/api-config.md": {"20dbfdcad80f9e9aa27ec07ffcce748ba06d1551": {"t": 1785746443.8868878, "n": 5690, "h": "3a4f9013b87495cc", "c": "# API Configuration Details\n\nField descriptions for each AI Service Source in the [AI Service Sources](beilu:settings/api) panel.\n\n## Panel Controls\n\nThe [AI Service Sources](beilu:settings/api) panel provides the following controls:\n\n| Control | Description |\n|---------|-------------|\n| Service Source list | Left side displays added API sources; click to switch editing |\n| New button | Create a new API Service Source |\n| Delete button | Delete the currently selected Service Source |\n| Config name | Text input; the display name of the Service Source |\n| Channel dropdown | Multiple Channels available (OpenAI / Claude / Gemini / Ollama, etc.); determines message format adaptation |\n| URL | Text input; the API endpoint URL |\n| Key | Text input; the API Key (stored encrypted) |\n| Model | Text input; the model name identifier |\n| Fetch model list | Button; pulls the list of available models from the API for selection |\n| Extended Thinking | Toggle; enable extended thinking capability (supported by some models) |\n| Budget slider | Thinking budget control (available when Extended Thinking is enabled) |\n| Save button | Save the current configuration |\n| Chain-of-thought fold settings | Configure the display label and folding behavior for chain-of-thought content |\n\n## Service Source Configuration Template\n\nEach AI Service Source configuration contains the following fields:\n\n| Field | Description | Required | Example |\n|-------|-------------|----------|---------|\n| name | Service Source name (for display) | Yes | `my-claude` |\n| url | API endpoint URL | Yes | `https://api.anthropic.com/v1/chat/completions` |\n| model | Model name to use | Yes | `claude-sonnet-4-20250514` |\n| apikey | API Key | Yes | `sk-ant-...` |\n| provider | Channel identifier | Recommended | `claude` |\n| use_stream | Whether to use Streaming responses | No | `true` (default) |\n| custom_headers | Custom request headers | No | `{\"X-Custom\": \"value\"}` |\n\n## Field Details\n\n### url (API Endpoint)\n\nThe API endpoint URL. Different providers and generators use different endpoint formats.\n\nThe default endpoint is automatically filled based on the selected Channel. If using a relay service or reverse proxy, replace it with the corresponding URL. Note that different generators correspond to different protocols:\n\n- **proxy generator**: OpenAI Chat Completions format (`/v1/chat/completions`)\n- **claude-api generator**: Anthropic Messages format (`/v1/messages`)\n- **gemini generator**: Gemini native format\n- **ollama generator**: Ollama format (`/api/chat`)\n\n### model (Model Name)\n\nThe model identifier to call. Model names vary by provider:\n\n| Provider | Model Name Examples |\n|----------|-------------------|\n| OpenAI | `gpt-4o`, `o3-mini` |\n| Claude | `claude-sonnet-4-20250514`, `claude-opus-4-20250514` |\n| Gemini | `gemini-2.0-flash`, `gemini-2.5-pro` |\n| DeepSeek | `deepseek-chat`, `deepseek-reasoner` |\n| Qwen | `qwen-plus`, `qwen-max` |\n\nThe model name can be overridden at runtime by `model_override` in a submode.\n\n### apikey (API Key)\n\nThe authentication key issued by the provider. Keys are stored encrypted in the configuration and are not exposed in plaintext in logs.\n\n### provider (Channel)\n\nTells always-accompany which provider's API this is, determining the message format adaptation strategy. See [Supported AI Providers](providers.md) for details.\n\nIt is strongly recommended to manually select a Channel rather than relying on auto-detection. Auto-detection (leaving blank or selecting \"Auto-detect\") guesses based on the URL and model name and may misidentify, causing API call failures.\n\n### use_stream (Streaming)\n\nWhether to use SSE Streaming responses. Enabled by default.\n\n- **Enabled**: AI replies appear word by word for a better experience\n- **Disabled**: Waits for the complete reply before displaying it all at once\n\nStreaming must be enabled in certain scenarios:\n- Qwen's enable_thinking feature\n- Inference mode on some local engines\n\n### custom_headers (Custom Request Headers)\n\nA JSON object for additional HTTP request headers. Commonly used for:\n\n- OpenRouter's `HTTP-Referer` and `X-Title`\n- Auth headers for corporate intranets\n- Custom authentication for reverse proxies\n\n### roleReminding (Role Reminding)\n\nBoolean; whether to enable role reminding in messages sent to the AI. When enabled, the system inserts role reminding text at appropriate positions to help the AI maintain character consistency. Enabled by default.\n\n### ignoreFiles (Ignore Attachments)\n\nBoolean; whether to ignore file content attached to conversations. Enable this to avoid API errors when using models that do not support file/image input.\n\n## Multi-Source Management\n\n### Character-Level Binding\n\nEach character can be bound to an independent AI Service Source. After specifying a Service Source in the character settings, conversations with that character will use the specified Service Source, unaffected by global settings.\n\n### Submode Override\n\nEach submode in Code and Work modes can independently override the model name and Sampling Parameters. This allows the same Service Source to use different models at different work stages (e.g., a smaller model for simple tasks, a larger model for complex analysis).\n\n## Security Notes\n\n- API Keys are transmitted over HTTPS and stored encrypted on the server\n- Local deployments (Ollama / LM Studio) do not require API Keys\n- In multi-user scenarios, each user's Service Source configuration is independently isolated\n\n## Navigation\n\n- [Service Source Overview](overview.md) — Basic concepts\n- [Supported AI Providers](providers.md) — Provider details\n- [Model Parameters](model-params.md) — Sampling Parameter descriptions\n"}, "d32bfd63368ae87a6c943f223c8b24e5043e1b09": {"t": 1785764305.2050061, "n": 5690, "h": "3a4f9013b87495cc", "c": "# API Configuration Details\n\nField descriptions for each AI Service Source in the [AI Service Sources](beilu:settings/api) panel.\n\n## Panel Controls\n\nThe [AI Service Sources](beilu:settings/api) panel provides the following controls:\n\n| Control | Description |\n|---------|-------------|\n| Service Source list | Left side displays added API sources; click to switch editing |\n| New button | Create a new API Service Source |\n| Delete button | Delete the currently selected Service Source |\n| Config name | Text input; the display name of the Service Source |\n| Channel dropdown | Multiple Channels available (OpenAI / Claude / Gemini / Ollama, etc.); determines message format adaptation |\n| URL | Text input; the API endpoint URL |\n| Key | Text input; the API Key (stored encrypted) |\n| Model | Text input; the model name identifier |\n| Fetch model list | Button; pulls the list of available models from the API for selection |\n| Extended Thinking | Toggle; enable extended thinking capability (supported by some models) |\n| Budget slider | Thinking budget control (available when Extended Thinking is enabled) |\n| Save button | Save the current configuration |\n| Chain-of-thought fold settings | Configure the display label and folding behavior for chain-of-thought content |\n\n## Service Source Configuration Template\n\nEach AI Service Source configuration contains the following fields:\n\n| Field | Description | Required | Example |\n|-------|-------------|----------|---------|\n| name | Service Source name (for display) | Yes | `my-claude` |\n| url | API endpoint URL | Yes | `https://api.anthropic.com/v1/chat/completions` |\n| model | Model name to use | Yes | `claude-sonnet-4-20250514` |\n| apikey | API Key | Yes | `sk-ant-...` |\n| provider | Channel identifier | Recommended | `claude` |\n| use_stream | Whether to use Streaming responses | No | `true` (default) |\n| custom_headers | Custom request headers | No | `{\"X-Custom\": \"value\"}` |\n\n## Field Details\n\n### url (API Endpoint)\n\nThe API endpoint URL. Different providers and generators use different endpoint formats.\n\nThe default endpoint is automatically filled based on the selected Channel. If using a relay service or reverse proxy, replace it with the corresponding URL. Note that different generators correspond to different protocols:\n\n- **proxy generator**: OpenAI Chat Completions format (`/v1/chat/completions`)\n- **claude-api generator**: Anthropic Messages format (`/v1/messages`)\n- **gemini generator**: Gemini native format\n- **ollama generator**: Ollama format (`/api/chat`)\n\n### model (Model Name)\n\nThe model identifier to call. Model names vary by provider:\n\n| Provider | Model Name Examples |\n|----------|-------------------|\n| OpenAI | `gpt-4o`, `o3-mini` |\n| Claude | `claude-sonnet-4-20250514`, `claude-opus-4-20250514` |\n| Gemini | `gemini-2.0-flash`, `gemini-2.5-pro` |\n| DeepSeek | `deepseek-chat`, `deepseek-reasoner` |\n| Qwen | `qwen-plus`, `qwen-max` |\n\nThe model name can be overridden at runtime by `model_override` in a submode.\n\n### apikey (API Key)\n\nThe authentication key issued by the provider. Keys are stored encrypted in the configuration and are not exposed in plaintext in logs.\n\n### provider (Channel)\n\nTells always-accompany which provider's API this is, determining the message format adaptation strategy. See [Supported AI Providers](providers.md) for details.\n\nIt is strongly recommended to manually select a Channel rather than relying on auto-detection. Auto-detection (leaving blank or selecting \"Auto-detect\") guesses based on the URL and model name and may misidentify, causing API call failures.\n\n### use_stream (Streaming)\n\nWhether to use SSE Streaming responses. Enabled by default.\n\n- **Enabled**: AI replies appear word by word for a better experience\n- **Disabled**: Waits for the complete reply before displaying it all at once\n\nStreaming must be enabled in certain scenarios:\n- Qwen's enable_thinking feature\n- Inference mode on some local engines\n\n### custom_headers (Custom Request Headers)\n\nA JSON object for additional HTTP request headers. Commonly used for:\n\n- OpenRouter's `HTTP-Referer` and `X-Title`\n- Auth headers for corporate intranets\n- Custom authentication for reverse proxies\n\n### roleReminding (Role Reminding)\n\nBoolean; whether to enable role reminding in messages sent to the AI. When enabled, the system inserts role reminding text at appropriate positions to help the AI maintain character consistency. Enabled by default.\n\n### ignoreFiles (Ignore Attachments)\n\nBoolean; whether to ignore file content attached to conversations. Enable this to avoid API errors when using models that do not support file/image input.\n\n## Multi-Source Management\n\n### Character-Level Binding\n\nEach character can be bound to an independent AI Service Source. After specifying a Service Source in the character settings, conversations with that character will use the specified Service Source, unaffected by global settings.\n\n### Submode Override\n\nEach submode in Code and Work modes can independently override the model name and Sampling Parameters. This allows the same Service Source to use different models at different work stages (e.g., a smaller model for simple tasks, a larger model for complex analysis).\n\n## Security Notes\n\n- API Keys are transmitted over HTTPS and stored encrypted on the server\n- Local deployments (Ollama / LM Studio) do not require API Keys\n- In multi-user scenarios, each user's Service Source configuration is independently isolated\n\n## Navigation\n\n- [Service Source Overview](overview.md) — Basic concepts\n- [Supported AI Providers](providers.md) — Provider details\n- [Model Parameters](model-params.md) — Sampling Parameter descriptions\n"}, "f7b9a495277c41d9eb4efd366f0eb7c9b9328335": {"t": 1786068444.7544465, "n": 5690, "h": "3a4f9013b87495cc", "c": "# API Configuration Details\n\nField descriptions for each AI Service Source in the [AI Service Sources](beilu:settings/api) panel.\n\n## Panel Controls\n\nThe [AI Service Sources](beilu:settings/api) panel provides the following controls:\n\n| Control | Description |\n|---------|-------------|\n| Service Source list | Left side displays added API sources; click to switch editing |\n| New button | Create a new API Service Source |\n| Delete button | Delete the currently selected Service Source |\n| Config name | Text input; the display name of the Service Source |\n| Channel dropdown | Multiple Channels available (OpenAI / Claude / Gemini / Ollama, etc.); determines message format adaptation |\n| URL | Text input; the API endpoint URL |\n| Key | Text input; the API Key (stored encrypted) |\n| Model | Text input; the model name identifier |\n| Fetch model list | Button; pulls the list of available models from the API for selection |\n| Extended Thinking | Toggle; enable extended thinking capability (supported by some models) |\n| Budget slider | Thinking budget control (available when Extended Thinking is enabled) |\n| Save button | Save the current configuration |\n| Chain-of-thought fold settings | Configure the display label and folding behavior for chain-of-thought content |\n\n## Service Source Configuration Template\n\nEach AI Service Source configuration contains the following fields:\n\n| Field | Description | Required | Example |\n|-------|-------------|----------|---------|\n| name | Service Source name (for display) | Yes | `my-claude` |\n| url | API endpoint URL | Yes | `https://api.anthropic.com/v1/chat/completions` |\n| model | Model name to use | Yes | `claude-sonnet-4-20250514` |\n| apikey | API Key | Yes | `sk-ant-...` |\n| provider | Channel identifier | Recommended | `claude` |\n| use_stream | Whether to use Streaming responses | No | `true` (default) |\n| custom_headers | Custom request headers | No | `{\"X-Custom\": \"value\"}` |\n\n## Field Details\n\n### url (API Endpoint)\n\nThe API endpoint URL. Different providers and generators use different endpoint formats.\n\nThe default endpoint is automatically filled based on the selected Channel. If using a relay service or reverse proxy, replace it with the corresponding URL. Note that different generators correspond to different protocols:\n\n- **proxy generator**: OpenAI Chat Completions format (`/v1/chat/completions`)\n- **claude-api generator**: Anthropic Messages format (`/v1/messages`)\n- **gemini generator**: Gemini native format\n- **ollama generator**: Ollama format (`/api/chat`)\n\n### model (Model Name)\n\nThe model identifier to call. Model names vary by provider:\n\n| Provider | Model Name Examples |\n|----------|-------------------|\n| OpenAI | `gpt-4o`, `o3-mini` |\n| Claude | `claude-sonnet-4-20250514`, `claude-opus-4-20250514` |\n| Gemini | `gemini-2.0-flash`, `gemini-2.5-pro` |\n| DeepSeek | `deepseek-chat`, `deepseek-reasoner` |\n| Qwen | `qwen-plus`, `qwen-max` |\n\nThe model name can be overridden at runtime by `model_override` in a submode.\n\n### apikey (API Key)\n\nThe authentication key issued by the provider. Keys are stored encrypted in the configuration and are not exposed in plaintext in logs.\n\n### provider (Channel)\n\nTells always-accompany which provider's API this is, determining the message format adaptation strategy. See [Supported AI Providers](providers.md) for details.\n\nIt is strongly recommended to manually select a Channel rather than relying on auto-detection. Auto-detection (leaving blank or selecting \"Auto-detect\") guesses based on the URL and model name and may misidentify, causing API call failures.\n\n### use_stream (Streaming)\n\nWhether to use SSE Streaming responses. Enabled by default.\n\n- **Enabled**: AI replies appear word by word for a better experience\n- **Disabled**: Waits for the complete reply before displaying it all at once\n\nStreaming must be enabled in certain scenarios:\n- Qwen's enable_thinking feature\n- Inference mode on some local engines\n\n### custom_headers (Custom Request Headers)\n\nA JSON object for additional HTTP request headers. Commonly used for:\n\n- OpenRouter's `HTTP-Referer` and `X-Title`\n- Auth headers for corporate intranets\n- Custom authentication for reverse proxies\n\n### roleReminding (Role Reminding)\n\nBoolean; whether to enable role reminding in messages sent to the AI. When enabled, the system inserts role reminding text at appropriate positions to help the AI maintain character consistency. Enabled by default.\n\n### ignoreFiles (Ignore Attachments)\n\nBoolean; whether to ignore file content attached to conversations. Enable this to avoid API errors when using models that do not support file/image input.\n\n## Multi-Source Management\n\n### Character-Level Binding\n\nEach character can be bound to an independent AI Service Source. After specifying a Service Source in the character settings, conversations with that character will use the specified Service Source, unaffected by global settings.\n\n### Submode Override\n\nEach submode in Code and Work modes can independently override the model name and Sampling Parameters. This allows the same Service Source to use different models at different work stages (e.g., a smaller model for simple tasks, a larger model for complex analysis).\n\n## Security Notes\n\n- API Keys are transmitted over HTTPS and stored encrypted on the server\n- Local deployments (Ollama / LM Studio) do not require API Keys\n- In multi-user scenarios, each user's Service Source configuration is independently isolated\n\n## Navigation\n\n- [Service Source Overview](overview.md) — Basic concepts\n- [Supported AI Providers](providers.md) — Provider details\n- [Model Parameters](model-params.md) — Sampling Parameter descriptions\n"}}, "site/wiki/locales/ja/ai-service/api-config.md": {"20dbfdcad80f9e9aa27ec07ffcce748ba06d1551": {"t": 1785746464.9624422, "n": 3582, "h": "81376a4643c2184f", "c": "# API 設定詳細\n\n各 AI サービスソースの [AI サービスソース](beilu:settings/api) パネルにおける設定フィールドの説明です。\n\n## パネル操作\n\n[AI サービスソース](beilu:settings/api)パネルでは以下の操作が可能です:\n\n| コントロール | 説明 |\n|------|------|\n| サービスソースリスト | 左側に追加済みの API ソースが表示され、クリックで編集を切り替えます |\n| 新規作成ボタン | 新しい API サービスソースを作成します |\n| 削除ボタン | 現在選択されているサービスソースを削除します |\n| 設定名 | テキスト入力。サービスソースの表示名です |\n| チャンネルドロップダウン | 複数のチャンネルから選択可能(OpenAI / Claude / Gemini / Ollama など)。メッセージフォーマットの適合を決定します |\n| URL | テキスト入力。API エンドポイントアドレスです |\n| Key | テキスト入力。API キー(暗号化保存) |\n| モデル | テキスト入力。モデル名の識別子です |\n| モデルリスト取得 | ボタン。API から利用可能なモデルリストを取得して選択できます |\n| Extended Thinking | スイッチ。拡張思考機能を有効にします(一部のモデルが対応) |\n| Budget スライダー | 思考バジェットの制御(Extended Thinking が有効な場合に利用可能) |\n| 保存ボタン | 現在の設定を保存します |\n| 思考チェーン折りたたみ設定 | 思考チェーン内容の表示ラベルと折りたたみ動作を設定します |\n\n## サービスソース設定テンプレート\n\n各 AI サービスソースの設定には以下のフィールドが含まれます:\n\n| フィールド | 説明 | 必須 | 例 |\n|------|------|------|------|\n| name | サービスソース名(表示用) | はい | `my-claude` |\n| url | API エンドポイントアドレス | はい | `https://api.anthropic.com/v1/chat/completions` |\n| model | 使用するモデル名 | はい | `claude-sonnet-4-20250514` |\n| apikey | API キー | はい | `sk-ant-...` |\n| provider | チャンネル識別子 | 推奨 | `claude` |\n| use_stream | ストリーミングレスポンスを使用するか | いいえ | `true`(デフォルト) |\n| custom_headers | カスタムリクエストヘッダー | いいえ | `{\"X-Custom\": \"value\"}` |\n\n## フィールド詳細\n\n### url(API エンドポイント)\n\nAPI エンドポイントアドレスです。プロバイダーやジェネレーターによって異なるエンドポイント形式を使用します。\n\nデフォルトエンドポイントは選択したチャンネルに基づいて自動的に入力されます。中継サービスやリバースプロキシを使用する場合は、対応するアドレスに置き換えてください。ジェネレーターによって対応するプロトコルが異なることに注意してください:\n\n- **proxy ジェネレーター**:OpenAI Chat Completions 形式(`/v1/chat/completions`)\n- **claude-api ジェネレーター**:Anthropic Messages 形式(`/v1/messages`)\n- **gemini ジェネレーター**:Gemini ネイティブ形式\n- **ollama ジェネレーター**:Ollama 形式(`/api/chat`)\n\n### model(モデル名)\n\n呼び出すモデルの識別子です。プロバイダーによってモデル名が異なります:\n\n| プロバイダー | モデル名の例 |\n|--------|-------------|\n| OpenAI | `gpt-4o`, `o3-mini` |\n| Claude | `claude-sonnet-4-20250514`, `claude-opus-4-20250514` |\n| Gemini | `gemini-2.0-flash`, `gemini-2.5-pro` |\n| DeepSeek | `deepseek-chat`, `deepseek-reasoner` |\n| Qwen | `qwen-plus`, `qwen-max` |\n\nモデル名はサブモードや実行時に `model_override` で上書きできます。\n\n### apikey(API キー)\n\nプロバイダーが発行した認証キーです。キーは設定内で暗号化保存され、ログに平文で表示されることはありません。\n\n### provider(チャンネル)\n\nalways-accompany にどのプロバイダーの API であるかを伝え、メッセージフォーマットの適合戦略を決定します。詳しくは [対応 AI プロバイダー](providers.md) をご覧ください。\n\n自動検出に頼らず、手動でチャンネルを選択することを強く推奨します。自動検出(空のまま、または「自動検出」を選択)は URL とモデル名から推測するため、誤判定により API 呼び出しが失敗する可能性があります。\n\n### use_stream(ストリーミングレスポンス)\n\nSSE ストリーミングレスポンスを使用するかどうかです。デフォルトで有効です。\n\n- **有効**:AI の応答が1文字ずつ表示され、体験が向上します\n- **無効**:完全な応答を待ってから一括表示します\n\n以下のシーンではストリーミングの有効化が必須です:\n- Qwen の enable_thinking 機能\n- 一部のローカルエンジンの推論モード\n\n### custom_headers(カスタムリクエストヘッダー)\n\nJSON オブジェクトで、追加の HTTP リクエストヘッダーです。主に以下の用途で使用されます:\n\n- OpenRouter の `HTTP-Referer` と `X-Title`\n- 企業イントラネットの認証ヘッダー\n- リバースプロキシのカスタム認証\n\n### roleReminding(ロールリマインダー)\n\nブール値で、AI に送信するメッセージ内でロールリマインダー(role reminding)を有効にするかどうかです。有効にすると、システムが適切な位置にロールリマインダーテキストを挿入し、AI のキャラクター一貫性の維持を助けます。デフォルトで有効です。\n\n### ignoreFiles(添付ファイルを無視)\n\nブール値で、会話に添付されたファイル内容を無視するかどうかです。一部のモデルがファイル/画像入力に対応していない場合、この項目を有効にすると API エラーを回避できます。\n\n## 複数サービスソースの管理\n\n### キャラクターレベルの紐付け\n\n各キャラクターは独立した AI サービスソースを紐付けできます。キャラクター設定でサービスソースを指定すると、そのキャラクターとの会話は指定されたサービスソースを使用し、グローバル設定の影響を受けません。\n\n### サブモード上書き\n\nCode モードと Work モードの各サブモードは、モデル名とサンプリングパラメータを独立して上書きできます。これにより、同じサービスソースで異なる作業フェーズに異なるモデルを使用できます(例:シンプルなタスクには小型モデル、複雑な分析には大型モデル)。\n\n## セキュリティに関する注意事項\n\n- API キーは HTTPS で送信され、サーバー側で暗号化保存されます\n- ローカルデプロイ(Ollama / LM Studio)では API キーは不要です\n- マルチユーザー環境では、各ユーザーのサービスソース設定が独立して分離されます\n\n## ナビゲーション\n\n- [サービスソース概要](overview.md) — 基本コンセプト\n- [対応 AI プロバイダー](providers.md) — 各プロバイダーの詳細\n- [モデルパラメータ](model-params.md) — サンプリングパラメータの説明\n"}, "d32bfd63368ae87a6c943f223c8b24e5043e1b09": {"t": 1785764302.3144054, "n": 3582, "h": "81376a4643c2184f", "c": "# API 設定詳細\n\n各 AI サービスソースの [AI サービスソース](beilu:settings/api) パネルにおける設定フィールドの説明です。\n\n## パネル操作\n\n[AI サービスソース](beilu:settings/api)パネルでは以下の操作が可能です:\n\n| コントロール | 説明 |\n|------|------|\n| サービスソースリスト | 左側に追加済みの API ソースが表示され、クリックで編集を切り替えます |\n| 新規作成ボタン | 新しい API サービスソースを作成します |\n| 削除ボタン | 現在選択されているサービスソースを削除します |\n| 設定名 | テキスト入力。サービスソースの表示名です |\n| チャンネルドロップダウン | 複数のチャンネルから選択可能(OpenAI / Claude / Gemini / Ollama など)。メッセージフォーマットの適合を決定します |\n| URL | テキスト入力。API エンドポイントアドレスです |\n| Key | テキスト入力。API キー(暗号化保存) |\n| モデル | テキスト入力。モデル名の識別子です |\n| モデルリスト取得 | ボタン。API から利用可能なモデルリストを取得して選択できます |\n| Extended Thinking | スイッチ。拡張思考機能を有効にします(一部のモデルが対応) |\n| Budget スライダー | 思考バジェットの制御(Extended Thinking が有効な場合に利用可能) |\n| 保存ボタン | 現在の設定を保存します |\n| 思考チェーン折りたたみ設定 | 思考チェーン内容の表示ラベルと折りたたみ動作を設定します |\n\n## サービスソース設定テンプレート\n\n各 AI サービスソースの設定には以下のフィールドが含まれます:\n\n| フィールド | 説明 | 必須 | 例 |\n|------|------|------|------|\n| name | サービスソース名(表示用) | はい | `my-claude` |\n| url | API エンドポイントアドレス | はい | `https://api.anthropic.com/v1/chat/completions` |\n| model | 使用するモデル名 | はい | `claude-sonnet-4-20250514` |\n| apikey | API キー | はい | `sk-ant-...` |\n| provider | チャンネル識別子 | 推奨 | `claude` |\n| use_stream | ストリーミングレスポンスを使用するか | いいえ | `true`(デフォルト) |\n| custom_headers | カスタムリクエストヘッダー | いいえ | `{\"X-Custom\": \"value\"}` |\n\n## フィールド詳細\n\n### url(API エンドポイント)\n\nAPI エンドポイントアドレスです。プロバイダーやジェネレーターによって異なるエンドポイント形式を使用します。\n\nデフォルトエンドポイントは選択したチャンネルに基づいて自動的に入力されます。中継サービスやリバースプロキシを使用する場合は、対応するアドレスに置き換えてください。ジェネレーターによって対応するプロトコルが異なることに注意してください:\n\n- **proxy ジェネレーター**:OpenAI Chat Completions 形式(`/v1/chat/completions`)\n- **claude-api ジェネレーター**:Anthropic Messages 形式(`/v1/messages`)\n- **gemini ジェネレーター**:Gemini ネイティブ形式\n- **ollama ジェネレーター**:Ollama 形式(`/api/chat`)\n\n### model(モデル名)\n\n呼び出すモデルの識別子です。プロバイダーによってモデル名が異なります:\n\n| プロバイダー | モデル名の例 |\n|--------|-------------|\n| OpenAI | `gpt-4o`, `o3-mini` |\n| Claude | `claude-sonnet-4-20250514`, `claude-opus-4-20250514` |\n| Gemini | `gemini-2.0-flash`, `gemini-2.5-pro` |\n| DeepSeek | `deepseek-chat`, `deepseek-reasoner` |\n| Qwen | `qwen-plus`, `qwen-max` |\n\nモデル名はサブモードや実行時に `model_override` で上書きできます。\n\n### apikey(API キー)\n\nプロバイダーが発行した認証キーです。キーは設定内で暗号化保存され、ログに平文で表示されることはありません。\n\n### provider(チャンネル)\n\nalways-accompany にどのプロバイダーの API であるかを伝え、メッセージフォーマットの適合戦略を決定します。詳しくは [対応 AI プロバイダー](providers.md) をご覧ください。\n\n自動検出に頼らず、手動でチャンネルを選択することを強く推奨します。自動検出(空のまま、または「自動検出」を選択)は URL とモデル名から推測するため、誤判定により API 呼び出しが失敗する可能性があります。\n\n### use_stream(ストリーミングレスポンス)\n\nSSE ストリーミングレスポンスを使用するかどうかです。デフォルトで有効です。\n\n- **有効**:AI の応答が1文字ずつ表示され、体験が向上します\n- **無効**:完全な応答を待ってから一括表示します\n\n以下のシーンではストリーミングの有効化が必須です:\n- Qwen の enable_thinking 機能\n- 一部のローカルエンジンの推論モード\n\n### custom_headers(カスタムリクエストヘッダー)\n\nJSON オブジェクトで、追加の HTTP リクエストヘッダーです。主に以下の用途で使用されます:\n\n- OpenRouter の `HTTP-Referer` と `X-Title`\n- 企業イントラネットの認証ヘッダー\n- リバースプロキシのカスタム認証\n\n### roleReminding(ロールリマインダー)\n\nブール値で、AI に送信するメッセージ内でロールリマインダー(role reminding)を有効にするかどうかです。有効にすると、システムが適切な位置にロールリマインダーテキストを挿入し、AI のキャラクター一貫性の維持を助けます。デフォルトで有効です。\n\n### ignoreFiles(添付ファイルを無視)\n\nブール値で、会話に添付されたファイル内容を無視するかどうかです。一部のモデルがファイル/画像入力に対応していない場合、この項目を有効にすると API エラーを回避できます。\n\n## 複数サービスソースの管理\n\n### キャラクターレベルの紐付け\n\n各キャラクターは独立した AI サービスソースを紐付けできます。キャラクター設定でサービスソースを指定すると、そのキャラクターとの会話は指定されたサービスソースを使用し、グローバル設定の影響を受けません。\n\n### サブモード上書き\n\nCode モードと Work モードの各サブモードは、モデル名とサンプリングパラメータを独立して上書きできます。これにより、同じサービスソースで異なる作業フェーズに異なるモデルを使用できます(例:シンプルなタスクには小型モデル、複雑な分析には大型モデル)。\n\n## セキュリティに関する注意事項\n\n- API キーは HTTPS で送信され、サーバー側で暗号化保存されます\n- ローカルデプロイ(Ollama / LM Studio)では API キーは不要です\n- マルチユーザー環境では、各ユーザーのサービスソース設定が独立して分離されます\n\n## ナビゲーション\n\n- [サービスソース概要](overview.md) — 基本コンセプト\n- [対応 AI プロバイダー](providers.md) — 各プロバイダーの詳細\n- [モデルパラメータ](model-params.md) — サンプリングパラメータの説明\n"}, "f7b9a495277c41d9eb4efd366f0eb7c9b9328335": {"t": 1786068448.3694382, "n": 3582, "h": "81376a4643c2184f", "c": "# API 設定詳細\n\n各 AI サービスソースの [AI サービスソース](beilu:settings/api) パネルにおける設定フィールドの説明です。\n\n## パネル操作\n\n[AI サービスソース](beilu:settings/api)パネルでは以下の操作が可能です:\n\n| コントロール | 説明 |\n|------|------|\n| サービスソースリスト | 左側に追加済みの API ソースが表示され、クリックで編集を切り替えます |\n| 新規作成ボタン | 新しい API サービスソースを作成します |\n| 削除ボタン | 現在選択されているサービスソースを削除します |\n| 設定名 | テキスト入力。サービスソースの表示名です |\n| チャンネルドロップダウン | 複数のチャンネルから選択可能(OpenAI / Claude / Gemini / Ollama など)。メッセージフォーマットの適合を決定します |\n| URL | テキスト入力。API エンドポイントアドレスです |\n| Key | テキスト入力。API キー(暗号化保存) |\n| モデル | テキスト入力。モデル名の識別子です |\n| モデルリスト取得 | ボタン。API から利用可能なモデルリストを取得して選択できます |\n| Extended Thinking | スイッチ。拡張思考機能を有効にします(一部のモデルが対応) |\n| Budget スライダー | 思考バジェットの制御(Extended Thinking が有効な場合に利用可能) |\n| 保存ボタン | 現在の設定を保存します |\n| 思考チェーン折りたたみ設定 | 思考チェーン内容の表示ラベルと折りたたみ動作を設定します |\n\n## サービスソース設定テンプレート\n\n各 AI サービスソースの設定には以下のフィールドが含まれます:\n\n| フィールド | 説明 | 必須 | 例 |\n|------|------|------|------|\n| name | サービスソース名(表示用) | はい | `my-claude` |\n| url | API エンドポイントアドレス | はい | `https://api.anthropic.com/v1/chat/completions` |\n| model | 使用するモデル名 | はい | `claude-sonnet-4-20250514` |\n| apikey | API キー | はい | `sk-ant-...` |\n| provider | チャンネル識別子 | 推奨 | `claude` |\n| use_stream | ストリーミングレスポンスを使用するか | いいえ | `true`(デフォルト) |\n| custom_headers | カスタムリクエストヘッダー | いいえ | `{\"X-Custom\": \"value\"}` |\n\n## フィールド詳細\n\n### url(API エンドポイント)\n\nAPI エンドポイントアドレスです。プロバイダーやジェネレーターによって異なるエンドポイント形式を使用します。\n\nデフォルトエンドポイントは選択したチャンネルに基づいて自動的に入力されます。中継サービスやリバースプロキシを使用する場合は、対応するアドレスに置き換えてください。ジェネレーターによって対応するプロトコルが異なることに注意してください:\n\n- **proxy ジェネレーター**:OpenAI Chat Completions 形式(`/v1/chat/completions`)\n- **claude-api ジェネレーター**:Anthropic Messages 形式(`/v1/messages`)\n- **gemini ジェネレーター**:Gemini ネイティブ形式\n- **ollama ジェネレーター**:Ollama 形式(`/api/chat`)\n\n### model(モデル名)\n\n呼び出すモデルの識別子です。プロバイダーによってモデル名が異なります:\n\n| プロバイダー | モデル名の例 |\n|--------|-------------|\n| OpenAI | `gpt-4o`, `o3-mini` |\n| Claude | `claude-sonnet-4-20250514`, `claude-opus-4-20250514` |\n| Gemini | `gemini-2.0-flash`, `gemini-2.5-pro` |\n| DeepSeek | `deepseek-chat`, `deepseek-reasoner` |\n| Qwen | `qwen-plus`, `qwen-max` |\n\nモデル名はサブモードや実行時に `model_override` で上書きできます。\n\n### apikey(API キー)\n\nプロバイダーが発行した認証キーです。キーは設定内で暗号化保存され、ログに平文で表示されることはありません。\n\n### provider(チャンネル)\n\nalways-accompany にどのプロバイダーの API であるかを伝え、メッセージフォーマットの適合戦略を決定します。詳しくは [対応 AI プロバイダー](providers.md) をご覧ください。\n\n自動検出に頼らず、手動でチャンネルを選択することを強く推奨します。自動検出(空のまま、または「自動検出」を選択)は URL とモデル名から推測するため、誤判定により API 呼び出しが失敗する可能性があります。\n\n### use_stream(ストリーミングレスポンス)\n\nSSE ストリーミングレスポンスを使用するかどうかです。デフォルトで有効です。\n\n- **有効**:AI の応答が1文字ずつ表示され、体験が向上します\n- **無効**:完全な応答を待ってから一括表示します\n\n以下のシーンではストリーミングの有効化が必須です:\n- Qwen の enable_thinking 機能\n- 一部のローカルエンジンの推論モード\n\n### custom_headers(カスタムリクエストヘッダー)\n\nJSON オブジェクトで、追加の HTTP リクエストヘッダーです。主に以下の用途で使用されます:\n\n- OpenRouter の `HTTP-Referer` と `X-Title`\n- 企業イントラネットの認証ヘッダー\n- リバースプロキシのカスタム認証\n\n### roleReminding(ロールリマインダー)\n\nブール値で、AI に送信するメッセージ内でロールリマインダー(role reminding)を有効にするかどうかです。有効にすると、システムが適切な位置にロールリマインダーテキストを挿入し、AI のキャラクター一貫性の維持を助けます。デフォルトで有効です。\n\n### ignoreFiles(添付ファイルを無視)\n\nブール値で、会話に添付されたファイル内容を無視するかどうかです。一部のモデルがファイル/画像入力に対応していない場合、この項目を有効にすると API エラーを回避できます。\n\n## 複数サービスソースの管理\n\n### キャラクターレベルの紐付け\n\n各キャラクターは独立した AI サービスソースを紐付けできます。キャラクター設定でサービスソースを指定すると、そのキャラクターとの会話は指定されたサービスソースを使用し、グローバル設定の影響を受けません。\n\n### サブモード上書き\n\nCode モードと Work モードの各サブモードは、モデル名とサンプリングパラメータを独立して上書きできます。これにより、同じサービスソースで異なる作業フェーズに異なるモデルを使用できます(例:シンプルなタスクには小型モデル、複雑な分析には大型モデル)。\n\n## セキュリティに関する注意事項\n\n- API キーは HTTPS で送信され、サーバー側で暗号化保存されます\n- ローカルデプロイ(Ollama / LM Studio)では API キーは不要です\n- マルチユーザー環境では、各ユーザーのサービスソース設定が独立して分離されます\n\n## ナビゲーション\n\n- [サービスソース概要](overview.md) — 基本コンセプト\n- [対応 AI プロバイダー](providers.md) — 各プロバイダーの詳細\n- [モデルパラメータ](model-params.md) — サンプリングパラメータの説明\n"}}, "src/public/parts/shells/beilu-chat/public/wiki/ai-service/api-config.md": {"20dbfdcad80f9e9aa27ec07ffcce748ba06d1551": {"t": 1785746466.2471766, "n": 3125, "h": "a0a08488b10cb0a2", "c": "# API 配置详解\n\n每个 AI 服务源在[AI服务源](beilu:settings/api)面板中的配置字段说明。\n\n## 面板操作\n\n[AI 服务源](beilu:settings/api)面板提供以下操作:\n\n| 控件 | 说明 |\n|------|------|\n| 服务源列表 | 左侧显示已添加的 API 源,点击切换编辑 |\n| 新建按钮 | 创建新的 API 服务源 |\n| 删除按钮 | 删除当前选中的服务源 |\n| 配置名称 | 文本输入,服务源的显示名称 |\n| API 类型下拉 | 选择服务类型(Anthropic Claude / DeepSeek / Qwen / Google Gemini(原生)/ Ollama(本地原生)等)。选项由后端渠道元数据单源下发,选中后自动填默认端点、显示该服务的坑提示。概念上它把「生成器 + 渠道」两层拍平成一层,详见[服务源概览](overview.md)的「生成器与渠道」 |\n| 坑提示区 | API 类型下拉下方,显示所选服务的已核实注意事项(如 Claude 的 temperature/top_p 互斥) |\n| URL | 文本输入,API 端点地址;旁边有「恢复默认」按钮可随时回填该类型的默认端点 |\n| Key | 文本输入,API 密钥(加密存储) |\n| 模型 | 文本输入,模型名称标识符 |\n| 获取模型列表 | 按钮,从 API 拉取可用模型列表供选择 |\n| Extended Thinking | 开关,启用扩展思考能力(部分模型支持) |\n| Budget 滑块 | 思考预算控制(Extended Thinking 开启后可用) |\n| 保存按钮 | 保存当前配置 |\n| 思维链折叠设置 | 配置思维链内容的显示标签和折叠行为 |\n\n## 服务源配置模板\n\n每个 AI 服务源的配置包含以下字段:\n\n| 字段 | 说明 | 必填 | 示例 |\n|------|------|------|------|\n| name | 服务源名称(显示用) | 是 | `my-claude` |\n| url | API 端点地址 | 是 | `https://api.anthropic.com/v1/chat/completions` |\n| model | 使用的模型名称 | 是 | `claude-sonnet-4-20250514` |\n| apikey | API 密钥 | 是 | `sk-ant-...` |\n| provider | 渠道标识 | 推荐 | `claude` |\n| use_stream | 是否使用流式响应 | 否 | `true`(默认) |\n| custom_headers | 自定义请求头 | 否 | `{\"X-Custom\": \"value\"}` |\n\n## 字段详解\n\n### url(API 端点)\n\nAPI 端点地址。不同服务商和生成器使用不同的端点格式。\n\n默认端点会根据选择的渠道自动填充。如果使用中转服务或反向代理,替换为对应地址即可。注意不同生成器对应不同协议:\n\n- **proxy 生成器**:OpenAI Chat Completions 格式(`/v1/chat/completions`)\n- **claude-api 生成器**:Anthropic Messages 格式(`/v1/messages`)\n- **gemini 生成器**:Gemini 原生格式\n- **ollama 生成器**:Ollama 格式(`/api/chat`)\n\n### model(模型名称)\n\n要调用的模型标识符。不同服务商的模型名称不同:\n\n| 服务商 | 模型名称示例 |\n|--------|-------------|\n| OpenAI | `gpt-4o`, `o3-mini` |\n| Claude | `claude-sonnet-4-20250514`, `claude-opus-4-20250514` |\n| Gemini | `gemini-2.0-flash`, `gemini-2.5-pro` |\n| DeepSeek | `deepseek-chat`, `deepseek-reasoner` |\n| Qwen | `qwen-plus`, `qwen-max` |\n\n模型名称可以在子模式或运行时被 `model_override` 覆盖。\n\n### apikey(API 密钥)\n\n服务商颁发的认证密钥。密钥在配置中加密存储,不会明文暴露在日志中。\n\n### provider(渠道)\n\n告诉 always-accompany 这是哪家服务商的 API,决定 OpenAI 兼容格式下的消息适配细节。**渠道只属于 proxy 生成器**——Ollama、Gemini 原生等走各自独立生成器的源没有这个字段。渠道共 10 个值(claude / openrouter-claude / openrouter / gemini / deepseek-r1 / deepseek / qwen / openai-reasoning / openai / generic),详见 [支持的 AI 服务商](providers.md)。\n\n强烈建议手动选择渠道而非依赖自动检测。自动检测(留空或选\"自动检测\")会根据 URL 和模型名猜测,可能误判导致 API 调用失败。\n\n### use_stream(流式响应)\n\n是否使用 SSE 流式响应。默认开启。\n\n- **开启**:AI 的回复逐字出现,体验更好\n- **关闭**:等待完整回复后一次性显示\n\n某些场景必须开启流式:\n- Qwen 的 enable_thinking 功能\n- 部分本地引擎的推理模式\n\n### custom_headers(自定义请求头)\n\nJSON 对象,额外的 HTTP 请求头。通常用于:\n\n- OpenRouter 的 `HTTP-Referer` 和 `X-Title`\n- 企业内网的认证头\n- 反向代理的自定义鉴权\n\n### roleReminding(角色提醒)\n\n布尔值,是否在发送给 AI 的消息中启用角色提醒(role reminding)。启用后,系统会在合适的位置插入角色提醒文本,帮助 AI 保持角色一致性。默认开启。\n\n### ignoreFiles(忽略附件)\n\n布尔值,是否忽略对话中附带的文件内容。某些模型不支持文件/图片输入时,开启此项可以避免 API 错误。\n\n## 多服务源管理\n\n### 角色级绑定\n\n每个角色可以绑定独立的 AI 服务源。在角色设置中指定服务源后,与该角色的对话将使用指定的服务源,不受全局设置影响。\n\n### 子模式覆盖\n\nCode 和 Work 模式的每个子模式可以独立覆盖模型名称和采样参数。这使得同一服务源在不同工作阶段可以使用不同模型(例如简单任务用小模型,复杂分析用大模型)。\n\n## 安全注意事项\n\n- API 密钥通过 HTTPS 传输,在服务端加密存储\n- 本地部署(Ollama / LM Studio)不需要 API 密钥\n- 多用户场景下,每个用户的服务源配置独立隔离\n\n## 导航\n\n- [服务源概览](overview.md) — 基础概念\n- [支持的 AI 服务商](providers.md) — 各服务商详情\n- [模型参数](model-params.md) — 采样参数说明\n"}, "00a1a22581c28fb78b08da3eaedb3c7f5e755dba": {"t": 1785764305.1692939, "n": 3125, "h": "a0a08488b10cb0a2", "c": "# API 配置详解\n\n每个 AI 服务源在[AI服务源](beilu:settings/api)面板中的配置字段说明。\n\n## 面板操作\n\n[AI 服务源](beilu:settings/api)面板提供以下操作:\n\n| 控件 | 说明 |\n|------|------|\n| 服务源列表 | 左侧显示已添加的 API 源,点击切换编辑 |\n| 新建按钮 | 创建新的 API 服务源 |\n| 删除按钮 | 删除当前选中的服务源 |\n| 配置名称 | 文本输入,服务源的显示名称 |\n| API 类型下拉 | 选择服务类型(Anthropic Claude / DeepSeek / Qwen / Google Gemini(原生)/ Ollama(本地原生)等)。选项由后端渠道元数据单源下发,选中后自动填默认端点、显示该服务的坑提示。概念上它把「生成器 + 渠道」两层拍平成一层,详见[服务源概览](overview.md)的「生成器与渠道」 |\n| 坑提示区 | API 类型下拉下方,显示所选服务的已核实注意事项(如 Claude 的 temperature/top_p 互斥) |\n| URL | 文本输入,API 端点地址;旁边有「恢复默认」按钮可随时回填该类型的默认端点 |\n| Key | 文本输入,API 密钥(加密存储) |\n| 模型 | 文本输入,模型名称标识符 |\n| 获取模型列表 | 按钮,从 API 拉取可用模型列表供选择 |\n| Extended Thinking | 开关,启用扩展思考能力(部分模型支持) |\n| Budget 滑块 | 思考预算控制(Extended Thinking 开启后可用) |\n| 保存按钮 | 保存当前配置 |\n| 思维链折叠设置 | 配置思维链内容的显示标签和折叠行为 |\n\n## 服务源配置模板\n\n每个 AI 服务源的配置包含以下字段:\n\n| 字段 | 说明 | 必填 | 示例 |\n|------|------|------|------|\n| name | 服务源名称(显示用) | 是 | `my-claude` |\n| url | API 端点地址 | 是 | `https://api.anthropic.com/v1/chat/completions` |\n| model | 使用的模型名称 | 是 | `claude-sonnet-4-20250514` |\n| apikey | API 密钥 | 是 | `sk-ant-...` |\n| provider | 渠道标识 | 推荐 | `claude` |\n| use_stream | 是否使用流式响应 | 否 | `true`(默认) |\n| custom_headers | 自定义请求头 | 否 | `{\"X-Custom\": \"value\"}` |\n\n## 字段详解\n\n### url(API 端点)\n\nAPI 端点地址。不同服务商和生成器使用不同的端点格式。\n\n默认端点会根据选择的渠道自动填充。如果使用中转服务或反向代理,替换为对应地址即可。注意不同生成器对应不同协议:\n\n- **proxy 生成器**:OpenAI Chat Completions 格式(`/v1/chat/completions`)\n- **claude-api 生成器**:Anthropic Messages 格式(`/v1/messages`)\n- **gemini 生成器**:Gemini 原生格式\n- **ollama 生成器**:Ollama 格式(`/api/chat`)\n\n### model(模型名称)\n\n要调用的模型标识符。不同服务商的模型名称不同:\n\n| 服务商 | 模型名称示例 |\n|--------|-------------|\n| OpenAI | `gpt-4o`, `o3-mini` |\n| Claude | `claude-sonnet-4-20250514`, `claude-opus-4-20250514` |\n| Gemini | `gemini-2.0-flash`, `gemini-2.5-pro` |\n| DeepSeek | `deepseek-chat`, `deepseek-reasoner` |\n| Qwen | `qwen-plus`, `qwen-max` |\n\n模型名称可以在子模式或运行时被 `model_override` 覆盖。\n\n### apikey(API 密钥)\n\n服务商颁发的认证密钥。密钥在配置中加密存储,不会明文暴露在日志中。\n\n### provider(渠道)\n\n告诉 always-accompany 这是哪家服务商的 API,决定 OpenAI 兼容格式下的消息适配细节。**渠道只属于 proxy 生成器**——Ollama、Gemini 原生等走各自独立生成器的源没有这个字段。渠道共 10 个值(claude / openrouter-claude / openrouter / gemini / deepseek-r1 / deepseek / qwen / openai-reasoning / openai / generic),详见 [支持的 AI 服务商](providers.md)。\n\n强烈建议手动选择渠道而非依赖自动检测。自动检测(留空或选\"自动检测\")会根据 URL 和模型名猜测,可能误判导致 API 调用失败。\n\n### use_stream(流式响应)\n\n是否使用 SSE 流式响应。默认开启。\n\n- **开启**:AI 的回复逐字出现,体验更好\n- **关闭**:等待完整回复后一次性显示\n\n某些场景必须开启流式:\n- Qwen 的 enable_thinking 功能\n- 部分本地引擎的推理模式\n\n### custom_headers(自定义请求头)\n\nJSON 对象,额外的 HTTP 请求头。通常用于:\n\n- OpenRouter 的 `HTTP-Referer` 和 `X-Title`\n- 企业内网的认证头\n- 反向代理的自定义鉴权\n\n### roleReminding(角色提醒)\n\n布尔值,是否在发送给 AI 的消息中启用角色提醒(role reminding)。启用后,系统会在合适的位置插入角色提醒文本,帮助 AI 保持角色一致性。默认开启。\n\n### ignoreFiles(忽略附件)\n\n布尔值,是否忽略对话中附带的文件内容。某些模型不支持文件/图片输入时,开启此项可以避免 API 错误。\n\n## 多服务源管理\n\n### 角色级绑定\n\n每个角色可以绑定独立的 AI 服务源。在角色设置中指定服务源后,与该角色的对话将使用指定的服务源,不受全局设置影响。\n\n### 子模式覆盖\n\nCode 和 Work 模式的每个子模式可以独立覆盖模型名称和采样参数。这使得同一服务源在不同工作阶段可以使用不同模型(例如简单任务用小模型,复杂分析用大模型)。\n\n## 安全注意事项\n\n- API 密钥通过 HTTPS 传输,在服务端加密存储\n- 本地部署(Ollama / LM Studio)不需要 API 密钥\n- 多用户场景下,每个用户的服务源配置独立隔离\n\n## 导航\n\n- [服务源概览](overview.md) — 基础概念\n- [支持的 AI 服务商](providers.md) — 各服务商详情\n- [模型参数](model-params.md) — 采样参数说明\n"}, "26827d927fa1895aacb8ad85567cb465cd73da00": {"t": 1786067781.7299592, "n": 3125, "h": "a0a08488b10cb0a2", "c": "# API 配置详解\n\n每个 AI 服务源在[AI服务源](beilu:settings/api)面板中的配置字段说明。\n\n## 面板操作\n\n[AI 服务源](beilu:settings/api)面板提供以下操作:\n\n| 控件 | 说明 |\n|------|------|\n| 服务源列表 | 左侧显示已添加的 API 源,点击切换编辑 |\n| 新建按钮 | 创建新的 API 服务源 |\n| 删除按钮 | 删除当前选中的服务源 |\n| 配置名称 | 文本输入,服务源的显示名称 |\n| API 类型下拉 | 选择服务类型(Anthropic Claude / DeepSeek / Qwen / Google Gemini(原生)/ Ollama(本地原生)等)。选项由后端渠道元数据单源下发,选中后自动填默认端点、显示该服务的坑提示。概念上它把「生成器 + 渠道」两层拍平成一层,详见[服务源概览](overview.md)的「生成器与渠道」 |\n| 坑提示区 | API 类型下拉下方,显示所选服务的已核实注意事项(如 Claude 的 temperature/top_p 互斥) |\n| URL | 文本输入,API 端点地址;旁边有「恢复默认」按钮可随时回填该类型的默认端点 |\n| Key | 文本输入,API 密钥(加密存储) |\n| 模型 | 文本输入,模型名称标识符 |\n| 获取模型列表 | 按钮,从 API 拉取可用模型列表供选择 |\n| Extended Thinking | 开关,启用扩展思考能力(部分模型支持) |\n| Budget 滑块 | 思考预算控制(Extended Thinking 开启后可用) |\n| 保存按钮 | 保存当前配置 |\n| 思维链折叠设置 | 配置思维链内容的显示标签和折叠行为 |\n\n## 服务源配置模板\n\n每个 AI 服务源的配置包含以下字段:\n\n| 字段 | 说明 | 必填 | 示例 |\n|------|------|------|------|\n| name | 服务源名称(显示用) | 是 | `my-claude` |\n| url | API 端点地址 | 是 | `https://api.anthropic.com/v1/chat/completions` |\n| model | 使用的模型名称 | 是 | `claude-sonnet-4-20250514` |\n| apikey | API 密钥 | 是 | `sk-ant-...` |\n| provider | 渠道标识 | 推荐 | `claude` |\n| use_stream | 是否使用流式响应 | 否 | `true`(默认) |\n| custom_headers | 自定义请求头 | 否 | `{\"X-Custom\": \"value\"}` |\n\n## 字段详解\n\n### url(API 端点)\n\nAPI 端点地址。不同服务商和生成器使用不同的端点格式。\n\n默认端点会根据选择的渠道自动填充。如果使用中转服务或反向代理,替换为对应地址即可。注意不同生成器对应不同协议:\n\n- **proxy 生成器**:OpenAI Chat Completions 格式(`/v1/chat/completions`)\n- **claude-api 生成器**:Anthropic Messages 格式(`/v1/messages`)\n- **gemini 生成器**:Gemini 原生格式\n- **ollama 生成器**:Ollama 格式(`/api/chat`)\n\n### model(模型名称)\n\n要调用的模型标识符。不同服务商的模型名称不同:\n\n| 服务商 | 模型名称示例 |\n|--------|-------------|\n| OpenAI | `gpt-4o`, `o3-mini` |\n| Claude | `claude-sonnet-4-20250514`, `claude-opus-4-20250514` |\n| Gemini | `gemini-2.0-flash`, `gemini-2.5-pro` |\n| DeepSeek | `deepseek-chat`, `deepseek-reasoner` |\n| Qwen | `qwen-plus`, `qwen-max` |\n\n模型名称可以在子模式或运行时被 `model_override` 覆盖。\n\n### apikey(API 密钥)\n\n服务商颁发的认证密钥。密钥在配置中加密存储,不会明文暴露在日志中。\n\n### provider(渠道)\n\n告诉 always-accompany 这是哪家服务商的 API,决定 OpenAI 兼容格式下的消息适配细节。**渠道只属于 proxy 生成器**——Ollama、Gemini 原生等走各自独立生成器的源没有这个字段。渠道共 10 个值(claude / openrouter-claude / openrouter / gemini / deepseek-r1 / deepseek / qwen / openai-reasoning / openai / generic),详见 [支持的 AI 服务商](providers.md)。\n\n强烈建议手动选择渠道而非依赖自动检测。自动检测(留空或选\"自动检测\")会根据 URL 和模型名猜测,可能误判导致 API 调用失败。\n\n### use_stream(流式响应)\n\n是否使用 SSE 流式响应。默认开启。\n\n- **开启**:AI 的回复逐字出现,体验更好\n- **关闭**:等待完整回复后一次性显示\n\n某些场景必须开启流式:\n- Qwen 的 enable_thinking 功能\n- 部分本地引擎的推理模式\n\n### custom_headers(自定义请求头)\n\nJSON 对象,额外的 HTTP 请求头。通常用于:\n\n- OpenRouter 的 `HTTP-Referer` 和 `X-Title`\n- 企业内网的认证头\n- 反向代理的自定义鉴权\n\n### roleReminding(角色提醒)\n\n布尔值,是否在发送给 AI 的消息中启用角色提醒(role reminding)。启用后,系统会在合适的位置插入角色提醒文本,帮助 AI 保持角色一致性。默认开启。\n\n### ignoreFiles(忽略附件)\n\n布尔值,是否忽略对话中附带的文件内容。某些模型不支持文件/图片输入时,开启此项可以避免 API 错误。\n\n## 多服务源管理\n\n### 角色级绑定\n\n每个角色可以绑定独立的 AI 服务源。在角色设置中指定服务源后,与该角色的对话将使用指定的服务源,不受全局设置影响。\n\n### 子模式覆盖\n\nCode 和 Work 模式的每个子模式可以独立覆盖模型名称和采样参数。这使得同一服务源在不同工作阶段可以使用不同模型(例如简单任务用小模型,复杂分析用大模型)。\n\n## 安全注意事项\n\n- API 密钥通过 HTTPS 传输,在服务端加密存储\n- 本地部署(Ollama / LM Studio)不需要 API 密钥\n- 多用户场景下,每个用户的服务源配置独立隔离\n\n## 导航\n\n- [服务源概览](overview.md) — 基础概念\n- [支持的 AI 服务商](providers.md) — 各服务商详情\n- [模型参数](model-params.md) — 采样参数说明\n"}}}}