AI Services FluentRead Integrates With: Complete Technical Reference
FluentRead integrates with over 25 AI translation services including OpenAI GPT-4o, Google Gemini, Anthropic Claude, DeepSeek, and major Chinese providers like Tongyi and Doubao, all managed through a central service registry in entrypoints/utils/option.ts.
FluentRead is an open-source browser extension that provides AI-powered bilingual translation. Understanding which AI services FluentRead integrates with helps users configure optimal translation backends and allows developers to extend the platform's capabilities.
Complete AI Service Catalog
FluentRead's service architecture uses a registry pattern defined in entrypoints/utils/option.ts. Lines 11-37 define the services object that maps service keys to their metadata, while lines 44-68 declare the servicesType.AI set categorizing these as AI-powered translation sources.
Each service has a dedicated implementation module under entrypoints/service/.
International LLM Providers
FluentRead supports leading Western AI providers through native API integrations:
-
OpenAI (
services.openai, line 11): Supports GPT-4o, GPT-4.1, and other models. Implementation resides inentrypoints/service/azure-openai.ts, which provides a generic OpenAI-compatible client used for both OpenAI and Azure OpenAI. -
Azure OpenAI (
services.azureOpenai, line 12): Enterprise deployment support sharing the same client implementation as standard OpenAI inentrypoints/service/azure-openai.ts. -
Google Gemini (
services.gemini, line 13): Native Gemini API integration implemented inentrypoints/service/gemini.ts. -
Anthropic Claude (
services.claude, line 18): Claude model family support inentrypoints/service/claude.ts. -
X.AI Grok (
services.grok, line 35): Grok model integration inentrypoints/service/grok.ts. -
OpenRouter (
services.openrouter, line 34): Unified API for accessing multiple models, implemented inentrypoints/service/openrouter.ts.
Chinese AI Providers
FluentRead provides extensive support for domestic Chinese AI services:
-
文心一言 (Yiyan) (
services.yiyan, line 14): Baidu's LLM inentrypoints/service/yiyan.ts. -
通义千问 (Tongyi) (
services.tongyi, line 15): Alibaba's Qwen models inentrypoints/service/tongyi.ts. -
智谱 AI (Zhipu) (
services.zhipu, line 16): ChatGLM models inentrypoints/service/zhipu.ts. -
Moonshot AI (
services.moonshot, line 17): Kimi models inentrypoints/service/moonshot.ts(generated via the genericcommonclient). -
百川 AI (Baichuan) (
services.baichuan, line 22): Baichuan models via the genericcommonclient. -
灵犀 AI (Lingyi) (
services.lingyi, line 23): Implementation inentrypoints/service/lingyi.ts. -
DeepSeek (
services.deepseek, line 24): DeepSeek models inentrypoints/service/deepseek.ts. -
MiniMax (
services.minimax, line 25): MiniMax API inentrypoints/service/minimax.ts. -
阶跃星辰 (Jieyue) (
services.jieyue, line 26): StepFun models inentrypoints/service/jieyue.ts. -
腾讯混元 (Hunyuan) (
services.huanYuan, line 30): Tencent's Hunyuan LLM. -
腾讯混元翻译 (HunyuanTranslation) (
services.huanYuanTranslation, line 31): Dedicated translation endpoint, both implemented inentrypoints/service/hunyuan-translation.ts. -
字节豆包 (Doubao) (
services.doubao, line 32): ByteDance's Doubao models inentrypoints/service/doubao.ts. -
硅流 (Silicon Cloud) (
services.siliconCloud, line 33): SiliconFlow's model platform with custom URL support inentrypoints/service/siliconcloud.ts.
Specialized and Utility Services
Beyond standard LLM providers, FluentRead includes specialized inference platforms and utility translators:
-
Infini (Infini-LLM) (
services.infini, line 20): Infini-LLM service inentrypoints/service/infini.ts. -
Groq (
services.groq, line 27): High-speed inference API inentrypoints/service/groq.ts. -
Coze (
services.cozecom, line 28;services.cozecn, line 29): ByteDance's Coze platform for international (cozecom) and Chinese (cozecn) endpoints, both handled inentrypoints/service/coze.ts. -
Custom API (
services.custom, line 19): User-defined HTTP endpoint with custom headers inentrypoints/service/custom.ts. -
New API (
services.newapi, line 36): Generic wrapper for any OpenAI-compatible endpoint inentrypoints/service/newapi.ts. -
Chrome Translator (
services.chromeTranslator, line 37): Built-in browser translation using Chrome's native API (non-LLM) inentrypoints/service/chrome-translator.ts.
Architecture and Implementation
FluentRead's AI service integration follows a modular registry pattern that separates service definitions from their concrete implementations.
Service Registry
The central catalog is defined in entrypoints/utils/option.ts. Lines 11-37 contain the services object that maps service identifiers to their configuration metadata, including display names, available models, and authentication requirements. Lines 44-68 define the servicesType.AI set, which categorizes these entries as AI-powered translation sources distinct from traditional translation engines.
Service Implementations
Each AI provider has a dedicated implementation module under entrypoints/service/:
- OpenAI-compatible clients: Services like OpenAI, Azure OpenAI, Moonshot, Baichuan, and New API share a common client structure defined in
entrypoints/service/azure-openai.tsor use the genericcommonclient generator. - Native SDK implementations: Providers like Google Gemini (
entrypoints/service/gemini.ts), Tongyi (entrypoints/service/tongyi.ts), and Zhipu (entrypoints/service/zhipu.ts) implement provider-specific authentication and request formatting. - Specialized handlers: Services like Coze (
entrypoints/service/coze.ts) and Hunyuan (entrypoints/service/hunyuan-translation.ts) handle platform-specific endpoints and translation-optimized models.
Request Dispatching
The entrypoints/utils/translateApi.ts module orchestrates translation requests. It reads the user's selected service from the registry, instantiates the appropriate client from entrypoints/service/, and manages streaming responses and error handling uniformly across all providers regardless of their underlying API differences.
Configuring Custom AI Endpoints
For services not included in the default registry, FluentRead provides two extension mechanisms defined in entrypoints/utils/option.ts:
-
Custom API (
services.custom, line 19): Configures arbitrary HTTP endpoints with custom headers, request formatting, and authentication schemes. Implementation resides inentrypoints/service/custom.ts. -
New API (
services.newapi, line 36): Provides a generic OpenAI-compatible wrapper for private or beta endpoints that follow the OpenAI API specification. Implemented inentrypoints/service/newapi.ts.
Both extension points support proxy configuration, custom base URLs, and model selection through the extension's options UI, allowing integration of private LLM deployments or emerging providers not yet hardcoded in the service registry.
Summary
- FluentRead integrates with 25+ AI services ranging from international LLMs (OpenAI GPT-4o, Claude, Gemini) to Chinese providers (Tongyi, Doubao, Hunyuan) and specialized inference platforms (Groq, Silicon Cloud).
- The service architecture uses a central registry in
entrypoints/utils/option.ts(lines 11-37) with modular implementations underentrypoints/service/. - OpenAI-compatible providers share client code in
entrypoints/service/azure-openai.ts, while native SDKs implement provider-specific logic. - Users can extend support via Custom API and New API endpoints for private or unsupported models.
- Non-AI translation is available through Chrome Translator (
entrypoints/service/chrome-translator.ts) using the browser's native API.
Frequently Asked Questions
How many AI services does FluentRead support out of the box?
FluentRead supports 25+ AI services natively, including major international providers like OpenAI, Google Gemini, and Anthropic Claude, alongside comprehensive Chinese provider support for Tongyi, Doubao, Hunyuan, and others. The complete authoritative list is defined in entrypoints/utils/option.ts at lines 11-37.
Can I use my own private AI endpoint with FluentRead?
Yes. FluentRead provides two mechanisms for custom endpoints: the Custom API service (services.custom at line 19 in entrypoints/utils/option.ts) for generic HTTP endpoints with custom headers, and the New API service (services.newapi at line 36) for OpenAI-compatible endpoints. Implementations reside in entrypoints/service/custom.ts and entrypoints/service/newapi.ts respectively.
Does FluentRead support Azure OpenAI Service?
Yes. Azure OpenAI is fully supported through the services.azureOpenai entry at line 12 in entrypoints/utils/option.ts. It shares the same underlying client implementation as standard OpenAI in entrypoints/service/azure-openai.ts, enabling seamless switching between OpenAI's direct API and Azure's enterprise deployment while maintaining identical request formatting.
How does FluentRead handle different authentication methods across providers?
Each service module under entrypoints/service/ implements provider-specific authentication. For example, entrypoints/service/gemini.ts handles Google API keys for Gemini, while entrypoints/service/azure-openai.ts manages OpenAI-compatible authentication patterns. The central dispatcher in entrypoints/utils/translateApi.ts routes requests to the appropriate handler based on the service registry configuration, ensuring uniform error handling despite differing authentication schemes.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →