XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/gpt4free

Standardize model configurations and enhance error handling (#2818)

* feat(docs/providers-and-models.md): add TypeGPT provider and update model support * feat(g4f/models.py): add TypeGPT provider and enhance model configurations * refactor(g4f/Provider/hf_space/BlackForestLabs_Flux1Dev.py): update model aliases and image models definition * refactor(g4f/Provider/hf_space/BlackForestLabs_Flux1Schnell.py): adjust model configuration and aliases * refactor(g4f/Provider/hf_space/CohereForAI_C4AI_Command.py): update model configuration and aliases * refactor(g4f/Provider/hf_space/DeepseekAI_JanusPro7b.py): reorganize model classification attributes * feat(g4f/Provider/hf_space/Microsoft_Phi_4.py): add model aliases and update vision model handling * refactor(g4f/Provider/hf_space/Qwen_QVQ_72B.py): restructure model configuration and aliases * feat(g4f/Provider/hf_space/Qwen_Qwen_2_5M_Demo.py): add model alias support for Qwen provider * refactor(g4f/Provider/hf_space/Qwen_Qwen_2_72B_Instruct.py): derive model list from aliases * refactor(g4f/Provider/hf_space/StabilityAI_SD35Large.py): adjust model list definitions using aliases * fix(g4f/Provider/hf_space/Voodoohop_Flux1Schnell.py): correct image_models definition in Voodoohop provider * feat(g4f/Provider/DDG.py): enhance request handling and error recovery * feat(g4f/Provider/DeepInfraChat.py): update model configurations and request handling * feat(g4f/Provider/TypeGPT.py): enhance TypeGPT API client with media support and async capabilities * refactor(docs/providers-and-models.md): remove streaming column from provider tables * Update docs/providers-and-models.md * added(g4f/Provider/hf_space/Qwen_Qwen_2_5_Max.py): new provider * Update g4f/Provider/hf_space/Qwen_Qwen_2_72B_Instruct.py * added(g4f/Provider/hf_space/Qwen_Qwen_2_5.py): new provider * Update g4f/Provider/DeepInfraChat.py g4f/Provider/TypeGPT.py * Update g4f/Provider/LambdaChat.py * Update g4f/Provider/DDG.py * Update g4f/Provider/DeepInfraChat.py * Update g4f/Provider/TypeGPT.py * Add audio generation model and update documentation * Update providers-and-models documentation and include ARTA in flux best providers * Update ARTA provider details and adjust documentation for image models * Remove redundant text_models assignment in LambdaChat provider --------- Co-authored-by: kqlio67 <>

97f1964b
kqlio67 <166700875+kqlio67@users.noreply.github.com>
提交于

代码差异

20 个文件 +663 -280
Modified docs/providers-and-models.md +104 -99
@@ -1,13 +1,9 @@
1
2
3
4 1 # G4F - Providers and Models
5 2
6 3 This document provides an overview of various AI providers and models, including text generation, image generation, and vision capabilities. It aims to help users navigate the diverse landscape of AI services and choose the most suitable option for their needs.
7 4
8 5 > **Note**: See our [Authentication Guide](authentication.md) for authentication instructions for the provider.
9 6
10
11 7 ## Table of Contents
12 8 - [Providers](#providers)
13 9 - [No auth required](#providers-not-needs-auth)
@@ -38,106 +34,108 @@ This document provides an overview of various AI providers and models, including
38 34
39 35 ---
40 36 ### Providers No auth required
41 | Website | API Credentials | Provider | Text generation | Image generation | Audio generation | Vision (Image Upload) | Streaming | Status |
42 |----------|-------------|--------------|---------------|--------|--------|------|------|------|
43 |[playground.allenai.org](https://playground.allenai.org)|No auth required|`g4f.Provider.AllenAI`|`tulu-3-405b, olmo-2-13b, tulu-3-1-8b, tulu-3-70b, olmoe-0125`|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
44 |[ai-arta.com](https://ai-arta.com)|No auth required|`g4f.Provider.ARTA`|❌|✔ _**(17+)**_|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
45 |[blackbox.ai](https://www.blackbox.ai)|No auth required|`g4f.Provider.Blackbox`|`blackboxai, gpt-4o-mini, deepseek-chat, deepseek-v3, deepseek-r1, gpt-4o, o1, o3-mini, claude-3.7-sonnet` _**(40+)**_|`flux`|❌|`blackboxai, gpt-4o, o1, o3-mini, deepseek-v3` _**(7+)**_|✔|![](https://img.shields.io/badge/Active-brightgreen)|
46 |[chatglm.cn](https://chatglm.cn)|No auth required|`g4f.Provider.ChatGLM`|`glm-4`|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
47 |[chatgpt.com](https://chatgpt.com)|No auth required|`g4f.Provider.ChatGpt`|✔ _**(7+)**_|❌|❌|❌|✔|![Error](https://img.shields.io/badge/HTTPError-f48d37)|
48 |[chatgpt.es](https://chatgpt.es)|No auth required|`g4f.Provider.ChatGptEs`|`gpt-4, gpt-4o, gpt-4o-mini`|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
49 |[playground.ai.cloudflare.com](https://playground.ai.cloudflare.com)|[Automatic cookies](https://playground.ai.cloudflare.com)|`g4f.Provider.Cloudflare`|`llama-2-7b, llama-3-8b, llama-3.1-8b, llama-3.2-1b, qwen-1.5-7b`|❌|❌|❌|✔|![Error](https://img.shields.io/badge/Active-brightgreen)|❌|
50 |[copilot.microsoft.com](https://copilot.microsoft.com)|Optional API key|`g4f.Provider.Copilot`|`gpt-4, o1`|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
51 |[duckduckgo.com/aichat](https://duckduckgo.com/aichat)|No auth required|`g4f.Provider.DDG`|`gpt-4, gpt-4o-mini, llama-3.3-70b, claude-3-haiku, o3-mini, mixtral-small-24b`|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
52 |[deepinfra.com/chat](https://deepinfra.com/chat)|No auth required|`g4f.Provider.DeepInfraChat`|`llama-3.1-8b, llama-3.2-90b, llama-3.3-70b, deepseek-v3, mixtral-small-24b, deepseek-r1, phi-4, wizardlm-2-8x22b, qwen-2.5-72b, yi-34b, qwen-2-72b, dolphin-2.6, dolphin-2.9, dbrx-instruct, airoboros-70b, lzlv-70b, wizardlm-2-7b, mixtral-8x22b, minicpm-2.5`|❌|❌|`llama-3.2-90b, minicpm-2.5`|✔|![](https://img.shields.io/badge/Active-brightgreen)|
53 |[dynaspark.onrender.com](https://dynaspark.onrender.com)|No auth required|`g4f.Provider.Dynaspark`|`gemini-1.5-flash, gemini-2.0-flash`|❌|❌|`gemini-1.5-flash, gemini-2.0-flash`|✔|![](https://img.shields.io/badge/Active-brightgreen)|
54 |[chat10.free2gpt.xyz](https://chat10.free2gpt.xyz)|No auth required|`g4f.Provider.Free2GPT`|`gemini-1.5-pro, gemini-1.5-flash`|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
55 |[freegptsnav.aifree.site](https://freegptsnav.aifree.site)|No auth required|`g4f.Provider.FreeGpt`|`gemini-1.5-pro, gemini-1.5-flash`|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
56 |[app.giz.ai/assistant](https://app.giz.ai/assistant)|No auth required|`g4f.Provider.GizAI`|`gemini-1.5-flash`|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
57 |[glider.so](https://glider.so)|No auth required|`g4f.Provider.Glider`|`llama-3.1-70b, llama-3.1-8b, llama-3.2-3b, deepseek-r1`|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
58 |[goabror.uz](https://goabror.uz)|No auth required|`g4f.Provider.Goabror`|`gpt-4`|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
59 |[hailuo.ai](https://www.hailuo.ai)|No auth required|`g4f.Provider.HailuoAI`|`MiniMax` _**(1+)**_|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
60 |[editor.imagelabs.net](editor.imagelabs.net)|No auth required|`g4f.Provider.ImageLabs`|❌|`sdxl-turbo`|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
61 |[huggingface.co/spaces](https://huggingface.co/spaces)|Optional API key|`g4f.Provider.HuggingSpace`|`qvq-72b, qwen-2-72b, command-r, command-r-plus, command-r7b, command-a`|`flux-dev, flux-schnell, sd-3.5`|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
62 |[jmuz.me](https://jmuz.me)|Optional API key|`g4f.Provider.Jmuz`|`claude-3-haiku, claude-3-opus, claude-3.5-sonnet, deepseek-r1, deepseek-chat, gemini-exp, gemini-1.5-flash, gemini-1.5-pro, gemini-2.0-flash-thinking, gpt-4, gpt-4o, gpt-4o-mini, llama-3-70b, llama-3-8b, llama-3.1-405b, llama-3.1-70b, llama-3.1-8b, llama-3.2-11b, llama-3.2-90b, llama-3.3-70b, mixtral-8x7b, qwen-2.5-72b, qwen-2.5-coder-32b, qwq-32b, wizardlm-2-8x22b`|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
63 |[lambda.chat](https://lambda.chat)|No auth required|`g4f.Provider.LambdaChat`|`deepseek-v3, deepseek-r1, hermes-3, nemotron-70b, llama-3.3-70b`|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
64 |[liaobots.work](https://liaobots.work)|[Automatic cookies](https://liaobots.work)|`g4f.Provider.Liaobots`|`claude-3.5-sonnet, claude-3.7-sonnet, claude-3.7-sonnet-thinking, claude-3-opus, claude-3-sonnet, deepseek-r1, deepseek-v3, gemini-2.0-flash, gemini-2.0-flash-thinking, gemini-2.0-pro, gpt-4, gpt-4o, gpt-4o-mini, grok-3, grok-3-r1, o3-mini`|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
65 |[oi-vscode-server.onrender.com](https://oi-vscode-server.onrender.com)|No auth required|`g4f.Provider.OIVSCode`|`gpt-4o-mini, deepseek-v3`|❌|❌|`gpt-4o-mini`|✔|![](https://img.shields.io/badge/Active-brightgreen)|
66 |[labs.perplexity.ai](https://labs.perplexity.ai)|No auth required|`g4f.Provider.PerplexityLabs`|`sonar, sonar-pro, sonar-reasoning, sonar-reasoning-pro`|❌|❌|❌|✔|![Error](https://img.shields.io/badge/Active-brightgreen)|
67 |[pi.ai/talk](https://pi.ai/talk)|[Manual cookies](https://pi.ai/talk)|`g4f.Provider.Pi`|`pi`|❌|❌|❌|✔|![Error](https://img.shields.io/badge/Active-brightgreen)|
68 |[pizzagpt.it](https://www.pizzagpt.it)|No auth required|`g4f.Provider.Pizzagpt`|`gpt-4o-mini`|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
69 |[pollinations.ai](https://pollinations.ai)|No auth required|`g4f.Provider.PollinationsAI`|`gpt-4o-mini, gpt-4o, o1-mini, qwen-2.5-coder-32b, llama-3.3-70b, mistral-nemo, llama-3.1-8b, deepseek-r1, phi-4` _**(9+)**_|`flux, flux-pro, flux-dev, flux-schnell, dall-e-3, sdxl-turbo`|✔ _**(1+)**_|`gpt-4o, gpt-4o-mini, o1-mini, o3-mini`|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
70 |[pollinations.ai](https://pollinations.ai)|No auth required|`g4f.Provider.PollinationsImage`|❌|`flux, flux-pro, flux-dev, flux-schnell, dall-e-3, sdxl-turbo`|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
71 |[teach-anything.com](https://www.teach-anything.com)|No auth required|`g4f.Provider.TeachAnything`|`gemini-1.5-pro, gemini-1.5-flash`|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
72 |[you.com](https://you.com)|[Manual cookies](https://you.com)|`g4f.Provider.You`|✔|✔|❌|✔|✔|![](https://img.shields.io/badge/Active-brightgreen)|
73 |[websim.ai](https://websim.ai)|No auth required|`g4f.Provider.Websim`|`gemini-1.5-pro, gemini-1.5-flash`|`flux`|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
74 |[chat9.yqcloud.top](https://chat9.yqcloud.top)|No auth required|`g4f.Provider.Yqcloud`|`gpt-4`|✔|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
37 | Website | API Credentials | Provider | Text generation | Image generation | Audio generation | Vision (Image Upload) | Status |
38 |----------|-------------|--------------|---------------|--------|--------|------|------|
39 |[playground.allenai.org](https://playground.allenai.org)|No auth required|`g4f.Provider.AllenAI`|`tulu-3-405b, olmo-2-13b, tulu-3-1-8b, tulu-3-70b, olmoe-0125`|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
40 |[ai-arta.com](https://ai-arta.com)|No auth required|`g4f.Provider.ARTA`|❌|✔ _**(17+)**_|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
41 |[blackbox.ai](https://www.blackbox.ai)|No auth required|`g4f.Provider.Blackbox`|`blackboxai, gpt-4o-mini, deepseek-chat, deepseek-v3, deepseek-r1, gpt-4o, o1, o3-mini, claude-3.7-sonnet` _**(40+)**_|`flux`|❌|`blackboxai, gpt-4o, o1, o3-mini, deepseek-v3` _**(7+)**_|![](https://img.shields.io/badge/Active-brightgreen)|
42 |[chatglm.cn](https://chatglm.cn)|No auth required|`g4f.Provider.ChatGLM`|`glm-4`|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
43 |[chatgpt.com](https://chatgpt.com)|No auth required|`g4f.Provider.ChatGpt`|✔ _**(7+)**_|❌|❌|❌|![Error](https://img.shields.io/badge/HTTPError-f48d37)|
44 |[chatgpt.es](https://chatgpt.es)|No auth required|`g4f.Provider.ChatGptEs`|`gpt-4, gpt-4o, gpt-4o-mini`|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
45 |[playground.ai.cloudflare.com](https://playground.ai.cloudflare.com)|[Automatic cookies](https://playground.ai.cloudflare.com)|`g4f.Provider.Cloudflare`|`llama-2-7b, llama-3-8b, llama-3.1-8b, llama-3.2-1b, qwen-1.5-7b`|❌|❌|❌|![Error](https://img.shields.io/badge/Active-brightgreen)|
46 |[copilot.microsoft.com](https://copilot.microsoft.com)|Optional API key|`g4f.Provider.Copilot`|`gpt-4, o1`|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
47 |[duckduckgo.com/aichat](https://duckduckgo.com/aichat)|No auth required|`g4f.Provider.DDG`|`gpt-4, gpt-4o-mini, llama-3.3-70b, claude-3-haiku, o3-mini, mixtral-small-24b`|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
48 |[deepinfra.com/chat](https://deepinfra.com/chat)|No auth required|`g4f.Provider.DeepInfraChat`|`llama-3.1-8b, llama-3.2-90b, llama-3.3-70b, deepseek-v3, mixtral-small-24b, deepseek-r1, phi-4, wizardlm-2-8x22b, qwen-2.5-72b, yi-34b, qwen-2-72b, dolphin-2.6, dolphin-2.9, dbrx-instruct, airoboros-70b, lzlv-70b, wizardlm-2-7b, mixtral-8x22b, minicpm-2.5`|❌|❌|`llama-3.2-90b, minicpm-2.5`|![](https://img.shields.io/badge/Active-brightgreen)|
49 |[dynaspark.onrender.com](https://dynaspark.onrender.com)|No auth required|`g4f.Provider.Dynaspark`|`gemini-1.5-flash, gemini-2.0-flash`|❌|❌|`gemini-1.5-flash, gemini-2.0-flash`|![](https://img.shields.io/badge/Active-brightgreen)|
50 |[chat10.free2gpt.xyz](https://chat10.free2gpt.xyz)|No auth required|`g4f.Provider.Free2GPT`|`gemini-1.5-pro, gemini-1.5-flash`|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
51 |[freegptsnav.aifree.site](https://freegptsnav.aifree.site)|No auth required|`g4f.Provider.FreeGpt`|`gemini-1.5-pro, gemini-1.5-flash`|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
52 |[app.giz.ai/assistant](https://app.giz.ai/assistant)|No auth required|`g4f.Provider.GizAI`|`gemini-1.5-flash`|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
53 |[glider.so](https://glider.so)|No auth required|`g4f.Provider.Glider`|`llama-3.1-70b, llama-3.1-8b, llama-3.2-3b, deepseek-r1`|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
54 |[goabror.uz](https://goabror.uz)|No auth required|`g4f.Provider.Goabror`|`gpt-4`|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
55 |[hailuo.ai](https://www.hailuo.ai)|No auth required|`g4f.Provider.HailuoAI`|`MiniMax` _**(1+)**_|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
56 |[editor.imagelabs.net](editor.imagelabs.net)|No auth required|`g4f.Provider.ImageLabs`|❌|`sdxl-turbo`|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
57 |[huggingface.co/spaces](https://huggingface.co/spaces)|Optional API key|`g4f.Provider.HuggingSpace`|`qvq-72b, qwen-2-72b, command-r, command-r-plus, command-r7b, command-a`|`flux-dev, flux-schnell, sd-3.5`|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
58 |[jmuz.me](https://jmuz.me)|Optional API key|`g4f.Provider.Jmuz`|`claude-3-haiku, claude-3-opus, claude-3.5-sonnet, deepseek-r1, deepseek-chat, gemini-exp, gemini-1.5-flash, gemini-1.5-pro, gemini-2.0-flash-thinking, gpt-4, gpt-4o, gpt-4o-mini, llama-3-70b, llama-3-8b, llama-3.1-405b, llama-3.1-70b, llama-3.1-8b, llama-3.2-11b, llama-3.2-90b, llama-3.3-70b, mixtral-8x7b, qwen-2.5-72b, qwen-2.5-coder-32b, qwq-32b, wizardlm-2-8x22b`|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
59 |[lambda.chat](https://lambda.chat)|No auth required|`g4f.Provider.LambdaChat`|`deepseek-v3, deepseek-r1, hermes-3, nemotron-70b, llama-3.3-70b`|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
60 |[liaobots.work](https://liaobots.work)|[Automatic cookies](https://liaobots.work)|`g4f.Provider.Liaobots`|`claude-3.5-sonnet, claude-3.7-sonnet, claude-3.7-sonnet-thinking, claude-3-opus, claude-3-sonnet, deepseek-r1, deepseek-v3, gemini-2.0-flash, gemini-2.0-flash-thinking, gemini-2.0-pro, gpt-4, gpt-4o, gpt-4o-mini, grok-3, grok-3-r1, o3-mini`|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
61 |[oi-vscode-server.onrender.com](https://oi-vscode-server.onrender.com)|No auth required|`g4f.Provider.OIVSCode`|`gpt-4o-mini, deepseek-v3`|❌|❌|`gpt-4o-mini`|![](https://img.shields.io/badge/Active-brightgreen)|
62 |[labs.perplexity.ai](https://labs.perplexity.ai)|No auth required|`g4f.Provider.PerplexityLabs`|`sonar, sonar-pro, sonar-reasoning, sonar-reasoning-pro`|❌|❌|❌|![Error](https://img.shields.io/badge/Active-brightgreen)|
63 |[pi.ai/talk](https://pi.ai/talk)|[Manual cookies](https://pi.ai/talk)|`g4f.Provider.Pi`|`pi`|❌|❌|❌|![Error](https://img.shields.io/badge/Active-brightgreen)|
64 |[pizzagpt.it](https://www.pizzagpt.it)|No auth required|`g4f.Provider.Pizzagpt`|`gpt-4o-mini`|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
65 |[pollinations.ai](https://pollinations.ai)|No auth required|`g4f.Provider.PollinationsAI`|`gpt-4o-mini, gpt-4o, o1-mini, qwen-2.5-coder-32b, llama-3.3-70b, mistral-nemo, llama-3.1-8b, deepseek-r1, phi-4` _**(9+)**_|`flux, flux-pro, flux-dev, flux-schnell, dall-e-3, sdxl-turbo`|`gpt-4o-audio`|`gpt-4o, gpt-4o-mini, o1-mini, o3-mini`|![](https://img.shields.io/badge/Active-brightgreen)|
66 |[pollinations.ai](https://pollinations.ai)|No auth required|`g4f.Provider.PollinationsImage`|❌|`flux, flux-pro, flux-dev, flux-schnell, dall-e-3, sdxl-turbo`|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
67 |[teach-anything.com](https://www.teach-anything.com)|No auth required|`g4f.Provider.TeachAnything`|`gemini-1.5-pro, gemini-1.5-flash`|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
68 |[chat.typegpt.net](https://chat.typegpt.net)|No auth required|`g4f.Provider.TypeGPT`|`gpt-3.5-turbo, o3-mini, deepseek-r1, deepseek-v3, evil, o1`|❌|❌|`gpt-3.5-turbo, o3-mini`|![](https://img.shields.io/badge/Active-brightgreen)|
69 |[you.com](https://you.com)|[Manual cookies](https://you.com)|`g4f.Provider.You`|✔|✔|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
70 |[websim.ai](https://websim.ai)|No auth required|`g4f.Provider.Websim`|`gemini-1.5-pro, gemini-1.5-flash`|`flux`|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
71 |[chat9.yqcloud.top](https://chat9.yqcloud.top)|No auth required|`g4f.Provider.Yqcloud`|`gpt-4`|✔|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
75 72
76 73 ---
77 74 ### Providers HuggingFace
78 | Website | API Credentials | Provider | Text generation | Image generation | Audio generation | Vision (Image Upload) | Streaming | Status |
79 |----------|-------------|--------------|---------------|--------|--------|------|------|------|
80 |[huggingface.co/chat](https://huggingface.co/chat)|[Manual cookies](https://huggingface.co/chat)|`g4f.Provider.HuggingChat`|`qwen-2.5-72b, llama-3.3-70b, command-r-plus, deepseek-r1, qwq-32b, nemotron-70b, llama-3.2-11b, mistral-nemo, phi-3.5-mini`|`flux-dev, flux-schnell`|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
81 |[huggingface.co/chat](https://huggingface.co/chat)|[API key / Cookies](https://huggingface.co/settings/tokens)|`g4f.Provider.HuggingFace`|✔ _**(47+)**_|✔ _**(9+)**_|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
82 |[api-inference.huggingface.co](https://api-inference.huggingface.co)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.HuggingFaceAPI`|✔ _**(9+)**_|✔ _**(2+)**_|❌|✔ _**(1+)**_|❌|![](https://img.shields.io/badge/Active-brightgreen)|✔|
75 | Website | API Credentials | Provider | Text generation | Image generation | Audio generation | Vision (Image Upload) | Status |
76 |----------|-------------|--------------|---------------|--------|--------|------|------|
77 |[huggingface.co/chat](https://huggingface.co/chat)|[Manual cookies](https://huggingface.co/chat)|`g4f.Provider.HuggingChat`|`qwen-2.5-72b, llama-3.3-70b, command-r-plus, deepseek-r1, qwq-32b, nemotron-70b, llama-3.2-11b, mistral-nemo, phi-3.5-mini`|`flux-dev, flux-schnell`|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
78 |[huggingface.co/chat](https://huggingface.co/chat)|[API key / Cookies](https://huggingface.co/settings/tokens)|`g4f.Provider.HuggingFace`|✔ _**(47+)**_|✔ _**(9+)**_|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
79 |[api-inference.huggingface.co](https://api-inference.huggingface.co)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.HuggingFaceAPI`|✔ _**(9+)**_|✔ _**(2+)**_|❌|✔ _**(1+)**_|![](https://img.shields.io/badge/Active-brightgreen)|
83 80
84 81 ---
85 82 ### Providers HuggingSpace
86 | Website | API Credentials | Provider | Text generation | Image generation | Audio generation | Vision (Image Upload) | Streaming | Status |
87 |----------|-------------|--------------|---------------|--------|--------|------|------|------|
88 |[black-forest-labs-flux-1-dev.hf.space](https://black-forest-labs-flux-1-dev.hf.space)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.BlackForestLabs_Flux1Dev`|❌|`flux-dev`|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
89 |[black-forest-labs-flux-1-schnell.hf.space](https://black-forest-labs-flux-1-schnell.hf.space)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.BlackForestLabs_Flux1Schnell`|❌|`flux-schnell`|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
90 |[cohereforai-c4ai-command.hf.space](https://cohereforai-c4ai-command.hf.space)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.CohereForAI_C4AI_Command`|`command-r, command-r-plus, command-r7b`|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
91 |[huggingface.co/spaces/deepseek-ai/Janus-Pro-7B](https://huggingface.co/spaces/deepseek-ai/Janus-Pro-7B)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.DeepseekAI_Janus_Pro_7b`|✔|✔|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
92 |[roxky-flux-1-dev.hf.space](https://roxky-flux-1-dev.hf.space)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.G4F`|✔ _**(1+)**_|✔ _**(4+)**_|❌|✔ _**(1+)**_|✔|![](https://img.shields.io/badge/Active-brightgreen)|
93 |[microsoft-phi-4-multimodal.hf.space](https://microsoft-phi-4-multimodal.hf.space)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.Microsoft_Phi_4`|✔ _**(1+)**_|❌|❌|✔ _**(1+)**_|✔|![](https://img.shields.io/badge/Active-brightgreen)|
94 |[qwen-qvq-72b-preview.hf.space](https://qwen-qvq-72b-preview.hf.space)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.Qwen_QVQ_72B`|`qvq-72b`|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
95 |[qwen-qwen2-5-1m-demo.hf.space](https://qwen-qwen2-5-1m-demo.hf.space)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.Qwen_Qwen_2_5M_Demo`|`qwen-2.5-1m-demo`|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
96 |[qwen-qwen2-72b-instruct.hf.space](https://qwen-qwen2-72b-instruct.hf.space)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.Qwen_Qwen_2_72B_Instruct`|`qwen-2-72b`|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
97 |[stabilityai-stable-diffusion-3-5-large.hf.space](https://stabilityai-stable-diffusion-3-5-large.hf.space)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.StabilityAI_SD35Large`|❌|`sd-3.5`|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
98 |[voodoohop-flux-1-schnell.hf.space](https://voodoohop-flux-1-schnell.hf.space)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.Voodoohop_Flux1Schnell`|❌|`flux-schnell`|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
83 | Website | API Credentials | Provider | Text generation | Image generation | Audio generation | Vision (Image Upload) | Status |
84 |----------|-------------|--------------|---------------|--------|--------|------|------|
85 |[black-forest-labs-flux-1-dev.hf.space](https://black-forest-labs-flux-1-dev.hf.space)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.BlackForestLabs_Flux1Dev`|❌|`flux, flux-dev`|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
86 |[black-forest-labs-flux-1-schnell.hf.space](https://black-forest-labs-flux-1-schnell.hf.space)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.BlackForestLabs_Flux1Schnell`|❌|`flux, flux-schnell`|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
87 |[cohereforai-c4ai-command.hf.space](https://cohereforai-c4ai-command.hf.space)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.CohereForAI_C4AI_Command`|`command-r, command-r-plus, command-r7b`|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
88 |[huggingface.co/spaces/deepseek-ai/Janus-Pro-7B](https://huggingface.co/spaces/deepseek-ai/Janus-Pro-7B)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.DeepseekAI_Janus_Pro_7b`|✔|✔|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
89 |[roxky-flux-1-dev.hf.space](https://roxky-flux-1-dev.hf.space)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.G4F`|✔ _**(1+)**_|✔ _**(4+)**_|❌|✔ _**(1+)**_|![](https://img.shields.io/badge/Active-brightgreen)|
90 |[microsoft-phi-4-multimodal.hf.space](https://microsoft-phi-4-multimodal.hf.space)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.Microsoft_Phi_4`|`phi-4`|❌|❌|`phi-4`|![](https://img.shields.io/badge/Active-brightgreen)|
91 |[qwen-qvq-72b-preview.hf.space](https://qwen-qvq-72b-preview.hf.space)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.Qwen_QVQ_72B`|`qvq-72b`|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
92 |[qwen-qwen2-5.hf.space](https://qwen-qwen2-5.hf.space)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.Qwen_Qwen_2_5`|`qwen-2.5`|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
93 |[qwen-qwen2-5-1m-demo.hf.space](https://qwen-qwen2-5-1m-demo.hf.space)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.Qwen_Qwen_2_5M`|`qwen-2.5-1m`|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
94 |[qwen-qwen2-5-max-demo.hf.space](https://qwen-qwen2-5-max-demo.hf.space)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.Qwen_Qwen_2_5_Max`|`qwen-2-5-max`|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
95 |[qwen-qwen2-72b-instruct.hf.space](https://qwen-qwen2-72b-instruct.hf.space)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.Qwen_Qwen_2_72B`|`qwen-2-72b`|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
96 |[stabilityai-stable-diffusion-3-5-large.hf.space](https://stabilityai-stable-diffusion-3-5-large.hf.space)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.StabilityAI_SD35Large`|❌|`sd-3.5`|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
97 |[voodoohop-flux-1-schnell.hf.space](https://voodoohop-flux-1-schnell.hf.space)|[Get API key](https://huggingface.co/settings/tokens)|`g4f.Provider.Voodoohop_Flux1Schnell`|❌|`flux, flux-schnell`|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
99 98
100 99 ### Providers Local
101 | Website | API Credentials | Provider | Text generation | Image generation | Audio generation | Vision (Image Upload) | Streaming | Status |
102 |----------|-------------|--------------|---------------|--------|--------|------|------|------|
103 |[]( )|No auth required|`g4f.Provider.Local`|✔|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
104 |[ollama.com](https://ollama.com)|No auth required|`g4f.Provider.Ollama`|✔|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
100 | Website | API Credentials | Provider | Text generation | Image generation | Audio generation | Vision (Image Upload) | Status |
101 |----------|-------------|--------------|---------------|--------|--------|------|------|
102 |[]( )|No auth required|`g4f.Provider.Local`|✔|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
103 |[ollama.com](https://ollama.com)|No auth required|`g4f.Provider.Ollama`|✔|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
105 104
106 105 ---
107 106 ### Providers MiniMax
108 | Website | API Credentials | Provider | Text generation | Image generation| Audio generation | Vision (Image Upload) | Stream | Status |
109 |----------|-------------|--------------|---------------|--------|--------|------|------|------|
110 |[hailuo.ai/chat](https://www.hailuo.ai/chat)|[Get API key](https://intl.minimaxi.com/user-center/basic-information/interface-key)|`g4f.Provider.MiniMax`|`MiniMax` _**(1)**_|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
111
107 | Website | API Credentials | Provider | Text generation | Image generation | Audio generation | Vision (Image Upload) | Status |
108 |----------|-------------|--------------|---------------|--------|--------|------|------|
109 |[hailuo.ai/chat](https://www.hailuo.ai/chat)|[Get API key](https://intl.minimaxi.com/user-center/basic-information/interface-key)|`g4f.Provider.MiniMax`|`MiniMax` _**(1+)**_|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
112 110
113 111 ---
114 112 ### Providers Needs Auth
115 | Website | API Credentials | Provider | Text generation | Image generation | Audio generation | Vision (Image Upload) | Streaming | Status |
116 |----------|-------------|--------------|---------------|--------|--------|------|------|------|
117 |[console.anthropic.com](https://console.anthropic.com)|[Get API key](https://console.anthropic.com/settings/keys)|`g4f.Provider.Anthropic`|✔ _**(8+)**_|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
118 |[bing.com/images/create](https://www.bing.com/images/create)|[Manual cookies](https://www.bing.com)|`g4f.Provider.BingCreateImages`|❌|`dall-e-3`|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
113 | Website | API Credentials | Provider | Text generation | Image generation | Audio generation | Vision (Image Upload) | Status |
114 |----------|-------------|--------------|---------------|--------|--------|------|------|
115 |[console.anthropic.com](https://console.anthropic.com)|[Get API key](https://console.anthropic.com/settings/keys)|`g4f.Provider.Anthropic`|✔ _**(8+)**_|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
116 |[bing.com/images/create](https://www.bing.com/images/create)|[Manual cookies](https://www.bing.com)|`g4f.Provider.BingCreateImages`|❌|`dall-e-3`|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
119 117 |[cablyai.com/chat](https://cablyai.com/chat)|[Get API key](https://cablyai.com)|`g4f.Provider.CablyAI`|✔|✔|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
120 |[inference.cerebras.ai](https://inference.cerebras.ai/)|[Get API key](https://cloud.cerebras.ai)|`g4f.Provider.Cerebras`|✔ _**(3+)**_|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
121 |[copilot.microsoft.com](https://copilot.microsoft.com)|[Manual cookies](https://copilot.microsoft.com)|`g4f.Provider.CopilotAccount`|✔ _**(1+)**_|✔ _**(1+)**_|❌|✔ _**(1+)**_|✔|![](https://img.shields.io/badge/Active-brightgreen)|
122 |[deepinfra.com](https://deepinfra.com)|[Get API key](https://deepinfra.com/dash/api_keys)|`g4f.Provider.DeepInfra`|✔ _**(17+)**_|✔ _**(6+)**_|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
123 |[platform.deepseek.com](https://platform.deepseek.com)|[Get API key](https://platform.deepseek.com/api_keys)|`g4f.Provider.DeepSeek`|✔ _**(1+)**_|❌|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
124 |[gemini.google.com](https://gemini.google.com)|[Manual cookies](https://gemini.google.com)|`g4f.Provider.Gemini`|`gemini-2.0`|`gemini-2.0`|❌|`gemini-2.0`|❌|![](https://img.shields.io/badge/Active-brightgreen)|
125 |[ai.google.dev](https://ai.google.dev)|[Get API key](https://aistudio.google.com/u/0/apikey)|`g4f.Provider.GeminiPro`|`gemini-1.5-flash, gemini-1.5-pro, gemini-2.0-flash`|❌|❌|`gemini-1.5-pro`|❌|![](https://img.shields.io/badge/Active-brightgreen)|
126 |[developers.sber.ru/gigachat](https://developers.sber.ru/gigachat)|[Manual cookies](https://developers.sber.ru/gigachat)|`g4f.Provider.GigaChat`|✔ _**(3+)**_|❌|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
127 |[github.com/copilot](https://github.com/copilot)|[Manual cookies](https://github.com/copilot)|`g4f.Provider.GithubCopilot`|✔ _**(4+)**_|❌|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
128 |[glhf.chat](https://glhf.chat)|[Get API key](https://glhf.chat/user-settings/api)|`g4f.Provider.GlhfChat`|✔ _**(22+)**_|❌|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
129 |[console.groq.com/playground](https://console.groq.com/playground)|[Get API key](https://console.groq.com/keys)|`g4f.Provider.Groq`|✔ _**(18+)**_|❌|❌|✔|❌|![](https://img.shields.io/badge/Active-brightgreen)|
130 |[meta.ai](https://www.meta.ai)|[Manual cookies](https://www.meta.ai)|`g4f.Provider.MetaAI`|`meta-ai`|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|✔|
131 |[meta.ai](https://www.meta.ai)|[Manual cookies](https://www.meta.ai)|`g4f.Provider.MetaAIAccount`|❌|`meta-ai`|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
132 |[designer.microsoft.com](https://designer.microsoft.com)|[Manual cookies](https://designer.microsoft.com)|`g4f.Provider.MicrosoftDesigner`|❌|`dall-e-3`|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
133 |[platform.openai.com](https://platform.openai.com)|[Get API key](https://platform.openai.com/settings/organization/api-keys)|`g4f.Provider.OpenaiAPI`|✔|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
134 |[chatgpt.com](https://chatgpt.com)|[Manual cookies](https://chatgpt.com)|`g4f.Provider.OpenaiChat`|`gpt-4o, gpt-4o-mini, gpt-4` _**(8+)**_|✔ _**(1)**_|❌|✔ _**(8+)**_|✔|![](https://img.shields.io/badge/Active-brightgreen)|
135 |[perplexity.ai](https://www.perplexity.ai)|[Get API key](https://www.perplexity.ai/settings/api)|`g4f.Provider.PerplexityApi`|✔ _**(6+)**_|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
136 |[chat.reka.ai](https://chat.reka.ai)|[Manual cookies](https://chat.reka.ai)|`g4f.Provider.Reka`|`reka-core`|✔|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
137 |[replicate.com](https://replicate.com)|[Get API key](https://replicate.com/account/api-tokens)|`g4f.Provider.Replicate`|✔ _**(1+)**_|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
138 |[beta.theb.ai](https://beta.theb.ai)|[Get API key](https://beta.theb.ai)|`g4f.Provider.ThebApi`|✔ _**(21+)**_|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
139 |[whiterabbitneo.com](https://www.whiterabbitneo.com)|[Manual cookies](https://www.whiterabbitneo.com)|`g4f.Provider.WhiteRabbitNeo`|✔|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
140 |[console.x.ai](https://console.x.ai)|[Get API key](https://console.x.ai)|`g4f.Provider.xAI`|✔|❌|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
118 |[inference.cerebras.ai](https://inference.cerebras.ai/)|[Get API key](https://cloud.cerebras.ai)|`g4f.Provider.Cerebras`|✔ _**(3+)**_|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
119 |[copilot.microsoft.com](https://copilot.microsoft.com)|[Manual cookies](https://copilot.microsoft.com)|`g4f.Provider.CopilotAccount`|✔ _**(1+)**_|✔ _**(1+)**_|❌|✔ _**(1+)**_|![](https://img.shields.io/badge/Active-brightgreen)|
120 |[deepinfra.com](https://deepinfra.com)|[Get API key](https://deepinfra.com/dash/api_keys)|`g4f.Provider.DeepInfra`|✔ _**(17+)**_|✔ _**(6+)**_|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
121 |[platform.deepseek.com](https://platform.deepseek.com)|[Get API key](https://platform.deepseek.com/api_keys)|`g4f.Provider.DeepSeek`|✔ _**(1+)**_|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
122 |[gemini.google.com](https://gemini.google.com)|[Manual cookies](https://gemini.google.com)|`g4f.Provider.Gemini`|`gemini-2.0`|`gemini-2.0`|❌|`gemini-2.0`|![](https://img.shields.io/badge/Active-brightgreen)|
123 |[ai.google.dev](https://ai.google.dev)|[Get API key](https://aistudio.google.com/u/0/apikey)|`g4f.Provider.GeminiPro`|`gemini-1.5-flash, gemini-1.5-pro, gemini-2.0-flash`|❌|❌|`gemini-1.5-pro`|![](https://img.shields.io/badge/Active-brightgreen)|
124 |[developers.sber.ru/gigachat](https://developers.sber.ru/gigachat)|[Manual cookies](https://developers.sber.ru/gigachat)|`g4f.Provider.GigaChat`|✔ _**(3+)**_|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
125 |[github.com/copilot](https://github.com/copilot)|[Manual cookies](https://github.com/copilot)|`g4f.Provider.GithubCopilot`|✔ _**(4+)**_|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
126 |[glhf.chat](https://glhf.chat)|[Get API key](https://glhf.chat/user-settings/api)|`g4f.Provider.GlhfChat`|✔ _**(22+)**_|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
127 |[console.groq.com/playground](https://console.groq.com/playground)|[Get API key](https://console.groq.com/keys)|`g4f.Provider.Groq`|✔ _**(18+)**_|❌|❌|✔|![](https://img.shields.io/badge/Active-brightgreen)|
128 |[meta.ai](https://www.meta.ai)|[Manual cookies](https://www.meta.ai)|`g4f.Provider.MetaAI`|`meta-ai`|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
129 |[meta.ai](https://www.meta.ai)|[Manual cookies](https://www.meta.ai)|`g4f.Provider.MetaAIAccount`|❌|`meta-ai`|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
130 |[designer.microsoft.com](https://designer.microsoft.com)|[Manual cookies](https://designer.microsoft.com)|`g4f.Provider.MicrosoftDesigner`|❌|`dall-e-3`|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
131 |[platform.openai.com](https://platform.openai.com)|[Get API key](https://platform.openai.com/settings/organization/api-keys)|`g4f.Provider.OpenaiAPI`|✔|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
132 |[chatgpt.com](https://chatgpt.com)|[Manual cookies](https://chatgpt.com)|`g4f.Provider.OpenaiChat`|`gpt-4o, gpt-4o-mini, gpt-4` _**(8+)**_|✔ _**(1)**_|❌|✔ _**(8+)**_|![](https://img.shields.io/badge/Active-brightgreen)|
133 |[perplexity.ai](https://www.perplexity.ai)|[Get API key](https://www.perplexity.ai/settings/api)|`g4f.Provider.PerplexityApi`|✔ _**(6+)**_|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
134 |[chat.reka.ai](https://chat.reka.ai)|[Manual cookies](https://chat.reka.ai)|`g4f.Provider.Reka`|`reka-core`|✔|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
135 |[replicate.com](https://replicate.com)|[Get API key](https://replicate.com/account/api-tokens)|`g4f.Provider.Replicate`|✔ _**(1+)**_|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
136 |[beta.theb.ai](https://beta.theb.ai)|[Get API key](https://beta.theb.ai)|`g4f.Provider.ThebApi`|✔ _**(21+)**_|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
137 |[whiterabbitneo.com](https://www.whiterabbitneo.com)|[Manual cookies](https://www.whiterabbitneo.com)|`g4f.Provider.WhiteRabbitNeo`|✔|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
138 |[console.x.ai](https://console.x.ai)|[Get API key](https://console.x.ai)|`g4f.Provider.xAI`|✔|❌|❌|❌|![](https://img.shields.io/badge/Active-brightgreen)|
141 139
142 140 ---
143 141 ## Models
@@ -145,12 +143,13 @@ This document provides an overview of various AI providers and models, including
145 143 ### Text generation models
146 144 | Model | Base Provider | Providers | Website |
147 145 |-------|---------------|-----------|---------|
146 |gpt-3.5-turbo|OpenAI|1+ Providers|[platform.openai.com](https://platform.openai.com/docs/engines/gpt-3.5-turbo)|
148 147 |gpt-4|OpenAI|9+ Providers|[platform.openai.com](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4)|
149 148 |gpt-4o|OpenAI|6+ Providers|[platform.openai.com](https://platform.openai.com/docs/models/gpt-4o)|
150 |gpt-4o-mini|OpenAI|8+ Providers|[platform.openai.com](https://platform.openai.com/docs/models/gpt-4o-mini)|
151 |o1|OpenAI|3+ Providers|[openai.com](https://openai.com/index/introducing-openai-o1-preview/)|
149 |gpt-4o-mini|OpenAI|9+ Providers|[platform.openai.com](https://platform.openai.com/docs/models/gpt-4o-mini)|
150 |o1|OpenAI|4+ Providers|[openai.com](https://openai.com/index/introducing-openai-o1-preview/)|
152 151 |o1-mini|OpenAI|1+ Providers|[openai.com](https://openai.com/index/openai-o1-mini-advancing-cost-efficient-reasoning/)|
153 |o3-mini|OpenAI|3+ Providers|[openai.com](https://openai.com/index/openai-o3-mini/)|
152 |o3-mini|OpenAI|4+ Providers|[openai.com](https://openai.com/index/openai-o3-mini/)|
154 153 |gigachat|GigaChat|1+ Providers|[developers.sber.ru/gigachat](https://developers.sber.ru/gigachat)|
155 154 |meta-ai|Meta|1+ Providers|[ai.meta.com](https://ai.meta.com/)|
156 155 |llama-2-7b|Meta Llama|1+ Providers|[huggingface.co](https://huggingface.co/meta-llama/Llama-2-7b)|
@@ -170,7 +169,7 @@ This document provides an overview of various AI providers and models, including
170 169 |mixtral-small-24b|Mistral|2+ Providers|[huggingface.co](https://huggingface.co/mistralai/Mistral-Small-24B-Instruct-2501)|
171 170 |hermes-3|NousResearch|1+ Providers|[huggingface.co](https://huggingface.co/NousResearch/Hermes-3-Llama-3.1-405B-FP8)|
172 171 |phi-3.5-mini|Microsoft|1+ Providers|[huggingface.co](https://huggingface.co/microsoft/Phi-3.5-mini-instruct)|
173 |phi-4|Microsoft|2+ Providers|[techcommunity.microsoft.com](https://techcommunity.microsoft.com/blog/aiplatformblog/introducing-phi-4-microsoft%E2%80%99s-newest-small-language-model-specializing-in-comple/4357090)|
172 |phi-4|Microsoft|3+ Providers|[techcommunity.microsoft.com](https://techcommunity.microsoft.com/blog/aiplatformblog/introducing-phi-4-microsoft%E2%80%99s-newest-small-language-model-specializing-in-comple/4357090)|
174 173 |wizardlm-2-7b|Microsoft|1+ Providers|[wizardlm.github.io](https://wizardlm.github.io/WizardLM2/)|
175 174 |wizardlm-2-8x22b|Microsoft|2+ Providers|[wizardlm.github.io](https://wizardlm.github.io/WizardLM2/)|
176 175 |gemini-exp|Google DeepMind|1+ Providers|[blog.google](https://blog.google/feed/gemini-exp-1206/)|
@@ -197,13 +196,14 @@ This document provides an overview of various AI providers and models, including
197 196 |qwen-2-vl-7b|Qwen|1+ Providers|[huggingface.co](https://huggingface.co/Qwen/Qwen2-VL-7B)|
198 197 |qwen-2.5-72b|Qwen|1+ Providers|[huggingface.co](https://huggingface.co/Qwen/Qwen2.5-72B-Instruct)|
199 198 |qwen-2.5-coder-32b|Qwen|3+ Providers|[huggingface.co](https://huggingface.co/Qwen/Qwen2.5-Coder-32B)|
200 |qwen-2.5-1m-demo|Qwen|1+ Providers|[huggingface.co](https://huggingface.co/Qwen/Qwen2.5-1M-Demo)|
199 |qwen-2.5-1m|Qwen|1+ Providers|[huggingface.co](https://huggingface.co/Qwen/Qwen2.5-1M-Demo)|
200 |qwen-2-5-max|Qwen|1+ Providers|[qwen-ai.com](https://www.qwen-ai.com/2-5-max/)|
201 201 |qwq-32b|Qwen|2+ Providers|[huggingface.co](https://huggingface.co/Qwen/QwQ-32B-Preview)|
202 202 |qvq-72b|Qwen|1+ Providers|[huggingface.co](https://huggingface.co/Qwen/QVQ-72B-Preview)|
203 203 |pi|Inflection|1+ Providers|[inflection.ai](https://inflection.ai/blog/inflection-2-5)|
204 204 |deepseek-chat|DeepSeek|2+ Providers|[huggingface.co](https://huggingface.co/deepseek-ai/deepseek-llm-67b-chat)|
205 |deepseek-v3|DeepSeek|4+ Providers|[api-docs.deepseek.com](https://api-docs.deepseek.com/news/news250120)|
206 |deepseek-r1|DeepSeek|9+ Providers|[api-docs.deepseek.com](https://api-docs.deepseek.com/news/news250120)|
205 |deepseek-v3|DeepSeek|5+ Providers|[api-docs.deepseek.com](https://api-docs.deepseek.com/news/news250120)|
206 |deepseek-r1|DeepSeek|10+ Providers|[api-docs.deepseek.com](https://api-docs.deepseek.com/news/news250120)|
207 207 |janus-pro-7b|DeepSeek|2+ Providers|[api-docs.deepseek.com](https://api-docs.deepseek.com/docs/janus-pro-7b)|
208 208 |grok-3|x.ai|1+ Providers|[x.ai](https://x.ai/blog/grok-3)|
209 209 |grok-3-r1|x.ai|1+ Providers|[x.ai](https://x.ai/blog/grok-3)|
@@ -228,7 +228,7 @@ This document provides an overview of various AI providers and models, including
228 228 |tulu-3-70b|Ai2|1+ Providers|[allenai.org](https://allenai.org/documentation)|
229 229 |olmoe-0125|Ai2|1+ Providers|[allenai.org](https://allenai.org/documentation)|
230 230 |lfm-40b|Liquid AI|1+ Providers|[liquid.ai](https://www.liquid.ai/liquid-foundation-models)|
231 |evil|Evil Mode - Experimental|1+ Providers|[]( )|
231 |evil|Evil Mode - Experimental|2+ Providers|[]( )|
232 232
233 233 ---
234 234 ### Image generation models
@@ -243,14 +243,19 @@ This document provides an overview of various AI providers and models, including
243 243 |dall-e-3|OpenAI|5+ Providers|[openai.com](https://openai.com/index/dall-e/)|
244 244 |midjourney|Midjourney|1+ Providers|[docs.midjourney.com](https://docs.midjourney.com/docs/model-versions)|
245 245
246 ---
247 ### Audio generation models
248 | Model | Base Provider | Providers | Website |
249 |-------|---------------|-----------|---------|
250 |gpt-4o-audio|Stability AI|1+ Providers|[platform.openai.com](https://platform.openai.com/docs/models/gpt-4o-audio)|
251
246 252
247 253 ## Conclusion and Usage Tips
248 254 This document provides a comprehensive overview of various AI providers and models available for text generation, image generation, and vision tasks. **When choosing a provider or model, consider the following factors:**
249 255 1. **Availability**: Check the status of the provider to ensure it's currently active and accessible.
250 256 2. **Model Capabilities**: Different models excel at different tasks. Choose a model that best fits your specific needs, whether it's text generation, image creation, or vision-related tasks.
251 257 3. **Authentication**: Some providers require authentication, while others don't. Consider this when selecting a provider for your project.
252 4. **Streaming Support**: If real-time responses are important for your application, prioritize providers that offer streaming capabilities.
253 5. **Vision Models**: For tasks requiring image understanding or multimodal interactions, look for providers offering vision models.
258 4. **Vision Models**: For tasks requiring image understanding or multimodal interactions, look for providers offering vision models.
254 259
255 260 Remember to stay updated with the latest developments in the AI field, as new models and providers are constantly emerging and evolving.
256 261
Modified g4f/Provider/ARTA.py +1 -1
@@ -75,7 +75,7 @@ class ARTA(AsyncGeneratorProvider, ProviderModelMixin):
75 75 "professional": "Professional",
76 76 "black_ink": "Black Ink"
77 77 }
78 image_models = [*model_aliases.keys()]
78 image_models = list(model_aliases.keys())
79 79 models = image_models
80 80
81 81 @classmethod
Modified g4f/Provider/DDG.py +174 -92
@@ -5,19 +5,22 @@ from aiohttp import ClientSession, ClientTimeout
5 5 import json
6 6 import asyncio
7 7 import random
8 from yarl import URL
8 9
9 10 from ..typing import AsyncResult, Messages, Cookies
10 11 from ..requests.raise_for_status import raise_for_status
11 12 from .base_provider import AsyncGeneratorProvider, ProviderModelMixin
12 from .helper import format_prompt
13 from .helper import format_prompt, get_last_user_message
13 14 from ..providers.response import FinishReason, JsonConversation
14 15 from ..errors import ModelNotSupportedError, ResponseStatusError, RateLimitError, TimeoutError, ConversationLimitError
15 16
17
16 18 class DuckDuckGoSearchException(Exception):
17 19 """Base exception class for duckduckgo_search."""
18 20
19 21 class Conversation(JsonConversation):
20 22 vqd: str = None
23 vqd_hash_1: str = None
21 24 message_history: Messages = []
22 25 cookies: dict = {}
23 26
@@ -30,7 +33,7 @@ class DDG(AsyncGeneratorProvider, ProviderModelMixin):
30 33 api_endpoint = "https://duckduckgo.com/duckchat/v1/chat"
31 34 status_url = "https://duckduckgo.com/duckchat/v1/status"
32 35
33 working = False
36 working = True
34 37 supports_stream = True
35 38 supports_system_message = True
36 39 supports_message_history = True
@@ -46,6 +49,8 @@ class DDG(AsyncGeneratorProvider, ProviderModelMixin):
46 49 }
47 50
48 51 last_request_time = 0
52 max_retries = 3
53 base_delay = 2
49 54
50 55 @classmethod
51 56 def validate_model(cls, model: str) -> str:
@@ -59,43 +64,78 @@ class DDG(AsyncGeneratorProvider, ProviderModelMixin):
59 64 return model
60 65
61 66 @classmethod
62 async def sleep(cls):
67 async def sleep(cls, multiplier=1.0):
63 68 """Implements rate limiting between requests"""
64 69 now = time.time()
65 70 if cls.last_request_time > 0:
66 delay = max(0.0, 0.75 - (now - cls.last_request_time))
71 delay = max(0.0, 1.5 - (now - cls.last_request_time)) * multiplier
67 72 if delay > 0:
68 73 await asyncio.sleep(delay)
69 cls.last_request_time = now
74 cls.last_request_time = time.time()
75
76 @classmethod
77 async def get_default_cookies(cls, session: ClientSession) -> dict:
78 """Obtains default cookies needed for API requests"""
79 try:
80 await cls.sleep()
81 # Make initial request to get cookies
82 async with session.get(cls.url) as response:
83 # We also manually set required cookies
84 cookies = {}
85 cookies_dict = {'dcs': '1', 'dcm': '3'}
86
87 for name, value in cookies_dict.items():
88 cookies[name] = value
89 url_obj = URL(cls.url)
90 session.cookie_jar.update_cookies({name: value}, url_obj)
91
92 return cookies
93 except Exception as e:
94 return {}
70 95
71 96 @classmethod
72 async def fetch_vqd(cls, session: ClientSession, max_retries: int = 3) -> str:
73 """Fetches the required VQD token for the chat session with retries."""
97 async def fetch_vqd_and_hash(cls, session: ClientSession, retry_count: int = 0) -> tuple[str, str]:
98 """Fetches the required VQD token and hash for the chat session with retries."""
74 99 headers = {
75 100 "accept": "text/event-stream",
101 "accept-language": "en-US,en;q=0.9",
102 "cache-control": "no-cache",
76 103 "content-type": "application/json",
104 "pragma": "no-cache",
105 "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36",
106 "origin": "https://duckduckgo.com",
107 "referer": "https://duckduckgo.com/",
77 108 "x-vqd-accept": "1",
78 "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
79 109 }
80 110
81 for attempt in range(max_retries):
82 try:
83 await cls.sleep()
84 async with session.get(cls.status_url, headers=headers) as response:
85 await raise_for_status(response)
86 vqd = response.headers.get("x-vqd-4", "")
87 if vqd:
88 return vqd
89 response_text = await response.text()
90 raise RuntimeError(f"Failed to fetch VQD token: {response.status} {response_text}")
91 except ResponseStatusError as e:
92 if attempt < max_retries - 1:
93 wait_time = random.uniform(1, 3) * (attempt + 1)
94 await asyncio.sleep(wait_time)
95 else:
96 raise RuntimeError(f"Failed to fetch VQD token after {max_retries} attempts: {str(e)}")
111 # Make sure we have cookies first
112 if len(session.cookie_jar) == 0:
113 await cls.get_default_cookies(session)
97 114
98 raise RuntimeError("Failed to fetch VQD token: Maximum retries exceeded")
115 try:
116 await cls.sleep(multiplier=1.0 + retry_count * 0.5)
117 async with session.get(cls.status_url, headers=headers) as response:
118 await raise_for_status(response)
119
120 vqd = response.headers.get("x-vqd-4", "")
121 vqd_hash_1 = response.headers.get("x-vqd-hash-1", "")
122
123 if vqd and vqd_hash_1:
124 return vqd, vqd_hash_1
125
126 if vqd and not vqd_hash_1:
127 return vqd, ""
128
129 response_text = await response.text()
130 raise RuntimeError(f"Failed to fetch VQD token and hash: {response.status} {response_text}")
131
132 except Exception as e:
133 if retry_count < cls.max_retries:
134 wait_time = cls.base_delay * (2 ** retry_count) * (1 + random.random())
135 await asyncio.sleep(wait_time)
136 return await cls.fetch_vqd_and_hash(session, retry_count + 1)
137 else:
138 raise RuntimeError(f"Failed to fetch VQD token and hash after {cls.max_retries} attempts: {str(e)}")
99 139
100 140 @classmethod
101 141 async def create_async_generator(
@@ -103,80 +143,122 @@ class DDG(AsyncGeneratorProvider, ProviderModelMixin):
103 143 model: str,
104 144 messages: Messages,
105 145 proxy: str = None,
106 timeout: int = 30,
146 timeout: int = 60,
107 147 cookies: Cookies = None,
108 148 conversation: Conversation = None,
109 149 return_conversation: bool = False,
110 150 **kwargs
111 151 ) -> AsyncResult:
112 152 model = cls.validate_model(model)
153 retry_count = 0
113 154
114 if cookies is None and conversation is not None:
115 cookies = conversation.cookies
155 while retry_count <= cls.max_retries:
156 try:
157 session_timeout = ClientTimeout(total=timeout)
158 async with ClientSession(timeout=session_timeout, cookies=cookies) as session:
159 if conversation is None:
160 # Get initial cookies if not provided
161 if not cookies:
162 await cls.get_default_cookies(session)
163
164 conversation = Conversation(model)
165 vqd, vqd_hash_1 = await cls.fetch_vqd_and_hash(session)
166 conversation.vqd = vqd
167 conversation.vqd_hash_1 = vqd_hash_1
168 conversation.message_history = [{"role": "user", "content": format_prompt(messages)}]
169 else:
170 last_message = get_last_user_message(messages.copy())
171 conversation.message_history.append({"role": "user", "content": last_message})
116 172
117 try:
118 async with ClientSession(timeout=ClientTimeout(total=timeout), cookies=cookies) as session:
119 if conversation is None:
120 conversation = Conversation(model)
121 conversation.vqd = await cls.fetch_vqd(session)
122 conversation.message_history = [{"role": "user", "content": format_prompt(messages)}]
123 else:
124 conversation.message_history.append(messages[-1])
125
126 headers = {
127 "accept": "text/event-stream",
128 "content-type": "application/json",
129 "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
130 "x-vqd-4": conversation.vqd,
131 }
132
133 data = {
134 "model": model,
135 "messages": conversation.message_history,
136 }
137
138 await cls.sleep()
139 async with session.post(cls.api_endpoint, json=data, headers=headers, proxy=proxy) as response:
140 await raise_for_status(response)
141 reason = None
142 full_message = ""
143
144 async for line in response.content:
145 line = line.decode("utf-8").strip()
146
147 if line.startswith("data:"):
148 try:
149 message = json.loads(line[5:].strip())
150 except json.JSONDecodeError:
173 headers = {
174 "accept": "text/event-stream",
175 "accept-language": "en-US,en;q=0.9",
176 "content-type": "application/json",
177 "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36",
178 "origin": "https://duckduckgo.com",
179 "referer": "https://duckduckgo.com/",
180 "x-vqd-4": conversation.vqd,
181 }
182
183 # Add the x-vqd-hash-1 header if available
184 if conversation.vqd_hash_1:
185 headers["x-vqd-hash-1"] = conversation.vqd_hash_1
186
187 data = {
188 "model": model,
189 "messages": conversation.message_history,
190 }
191
192 await cls.sleep(multiplier=1.0 + retry_count * 0.5)
193 async with session.post(cls.api_endpoint, json=data, headers=headers, proxy=proxy) as response:
194 # Handle 429 errors specifically
195 if response.status == 429:
196 response_text = await response.text()
197
198 if retry_count < cls.max_retries:
199 retry_count += 1
200 wait_time = cls.base_delay * (2 ** retry_count) * (1 + random.random())
201 await asyncio.sleep(wait_time)
202
203 # Get fresh tokens and cookies
204 cookies = await cls.get_default_cookies(session)
151 205 continue
206 else:
207 raise RateLimitError(f"Rate limited after {cls.max_retries} retries")
208
209 await raise_for_status(response)
210 reason = None
211 full_message = ""
212
213 async for line in response.content:
214 line = line.decode("utf-8").strip()
215
216 if line.startswith("data:"):
217 try:
218 message = json.loads(line[5:].strip())
219 except json.JSONDecodeError:
220 continue
221
222 if "action" in message and message["action"] == "error":
223 error_type = message.get("type", "")
224 if message.get("status") == 429:
225 if error_type == "ERR_CONVERSATION_LIMIT":
226 raise ConversationLimitError(error_type)
227 raise RateLimitError(error_type)
228 raise DuckDuckGoSearchException(error_type)
152 229
153 if "action" in message and message["action"] == "error":
154 error_type = message.get("type", "")
155 if message.get("status") == 429:
156 if error_type == "ERR_CONVERSATION_LIMIT":
157 raise ConversationLimitError(error_type)
158 raise RateLimitError(error_type)
159 raise DuckDuckGoSearchException(error_type)
160
161 if "message" in message:
162 if message["message"]:
163 yield message["message"]
164 full_message += message["message"]
165 reason = "length"
166 else:
167 reason = "stop"
168
169 if return_conversation:
170 conversation.message_history.append({"role": "assistant", "content": full_message})
171 conversation.vqd = response.headers.get("x-vqd-4", conversation.vqd)
172 conversation.cookies = {
173 n: c.value
174 for n, c in session.cookie_jar.filter_cookies(cls.url).items()
175 }
176 yield conversation
177
178 if reason is not None:
179 yield FinishReason(reason)
180
181 except asyncio.TimeoutError as e:
182 raise TimeoutError(f"Request timed out: {str(e)}")
230 if "message" in message:
231 if message["message"]:
232 yield message["message"]
233 full_message += message["message"]
234 reason = "length"
235 else:
236 reason = "stop"
237
238 if return_conversation:
239 conversation.message_history.append({"role": "assistant", "content": full_message})
240 conversation.vqd = response.headers.get("x-vqd-4", conversation.vqd)
241 conversation.vqd_hash_1 = response.headers.get("x-vqd-hash-1", conversation.vqd_hash_1)
242 conversation.cookies = {
243 n: c.value
244 for n, c in session.cookie_jar.filter_cookies(URL(cls.url)).items()
245 }
246 yield conversation
247
248 if reason is not None:
249 yield FinishReason(reason)
250
251 # If we got here, the request was successful
252 break
253
254 except (RateLimitError, ResponseStatusError) as e:
255 if "429" in str(e) and retry_count < cls.max_retries:
256 retry_count += 1
257 wait_time = cls.base_delay * (2 ** retry_count) * (1 + random.random())
258 await asyncio.sleep(wait_time)
259 else:
260 raise
261 except asyncio.TimeoutError as e:
262 raise TimeoutError(f"Request timed out: {str(e)}")
263 except Exception as e:
264 raise
Modified g4f/Provider/DeepInfraChat.py +2 -37
@@ -1,8 +1,6 @@
1 1 from __future__ import annotations
2 2
3 from ..typing import AsyncResult, Messages, MediaListType
4 3 from .template import OpenaiTemplate
5 from ..image import to_data_uri
6 4
7 5 class DeepInfraChat(OpenaiTemplate):
8 6 url = "https://deepinfra.com/chat"
@@ -10,8 +8,8 @@ class DeepInfraChat(OpenaiTemplate):
10 8 working = True
11 9
12 10 default_model = 'deepseek-ai/DeepSeek-V3'
13 default_vision_model = 'meta-llama/Llama-3.2-90B-Vision-Instruct'
14 vision_models = [default_vision_model, 'openbmb/MiniCPM-Llama3-V-2_5']
11 default_vision_model = 'openbmb/MiniCPM-Llama3-V-2_5'
12 vision_models = [default_vision_model, 'meta-llama/Llama-3.2-90B-Vision-Instruct']
15 13 models = [
16 14 'meta-llama/Meta-Llama-3.1-8B-Instruct',
17 15 'meta-llama/Llama-3.3-70B-Instruct-Turbo',
@@ -59,36 +57,3 @@ class DeepInfraChat(OpenaiTemplate):
59 57 "mixtral-8x22b": "mistralai/Mixtral-8x22B-Instruct-v0.1",
60 58 "minicpm-2.5": "openbmb/MiniCPM-Llama3-V-2_5",
61 59 }
62
63 @classmethod
64 async def create_async_generator(
65 cls,
66 model: str,
67 messages: Messages,
68 stream: bool = True,
69 top_p: float = 0.9,
70 temperature: float = 0.7,
71 max_tokens: int = None,
72 headers: dict = {},
73 **kwargs
74 ) -> AsyncResult:
75 headers = {
76 'Accept-Language': 'en-US,en;q=0.9',
77 'Origin': 'https://deepinfra.com',
78 'Referer': 'https://deepinfra.com/',
79 'X-Deepinfra-Source': 'web-page',
80 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36',
81 **headers
82 }
83
84 async for chunk in super().create_async_generator(
85 model,
86 messages,
87 headers=headers,
88 stream=stream,
89 top_p=top_p,
90 temperature=temperature,
91 max_tokens=max_tokens,
92 **kwargs
93 ):
94 yield chunk
Modified g4f/Provider/LambdaChat.py +2 -1
@@ -14,7 +14,6 @@ class LambdaChat(HuggingChat):
14 14 default_model = "deepseek-llama3.3-70b"
15 15 reasoning_model = "deepseek-r1"
16 16 image_models = []
17 models = []
18 17 fallback_models = [
19 18 default_model,
20 19 reasoning_model,
@@ -23,6 +22,8 @@ class LambdaChat(HuggingChat):
23 22 "lfm-40b",
24 23 "llama3.3-70b-instruct-fp8"
25 24 ]
25 models = fallback_models.copy()
26
26 27 model_aliases = {
27 28 "deepseek-v3": default_model,
28 29 "hermes-3": "hermes-3-llama-3.1-405b-fp8",
Modified g4f/Provider/TypeGPT.py +7 -6
@@ -5,13 +5,14 @@ from .template import OpenaiTemplate
5 5 class TypeGPT(OpenaiTemplate):
6 6 label = "TypeGpt"
7 7 url = "https://chat.typegpt.net"
8 api_endpoint = "https://chat.typegpt.net/api/openai/typegpt/v1/chat/completions"
8 api_base = "https://chat.typegpt.net/api/openai/typegpt/v1"
9 9 working = True
10 10
11 default_model = "gpt-4o-mini-2024-07-18"
12 models = [
13 default_model, "o1", "o3-mini", "gemini-1.5-flash", "deepseek-r1", "deepseek-v3", "gemini-pro", "evil"
14 ]
11 default_model = 'gpt-4o-mini-2024-07-18'
12 default_vision_model = default_model
13 vision_models = ['gpt-3.5-turbo', 'gpt-3.5-turbo-202201', default_vision_model, "o3-mini"]
14 models = vision_models + ["deepseek-r1", "deepseek-v3", "evil", "o1"]
15 15 model_aliases = {
16 "gpt-3.5-turbo": "gpt-3.5-turbo-202201",
16 17 "gpt-4o-mini": "gpt-4o-mini-2024-07-18",
17 }
18 }
Modified g4f/Provider/hf_space/BlackForestLabs_Flux1Dev.py +2 -2
@@ -22,8 +22,8 @@ class BlackForestLabs_Flux1Dev(AsyncGeneratorProvider, ProviderModelMixin):
22 22
23 23 default_model = 'black-forest-labs-flux-1-dev'
24 24 default_image_model = default_model
25 model_aliases = {"flux-dev": default_model, "flux": default_model}
26 image_models = [default_image_model, *model_aliases.keys()]
25 model_aliases = {"flux-dev": default_image_model, "flux": default_image_model}
26 image_models = list(model_aliases.keys())
27 27 models = image_models
28 28
29 29 @classmethod
Modified g4f/Provider/hf_space/BlackForestLabs_Flux1Schnell.py +2 -2
@@ -19,8 +19,8 @@ class BlackForestLabs_Flux1Schnell(AsyncGeneratorProvider, ProviderModelMixin):
19 19
20 20 default_model = "black-forest-labs-flux-1-schnell"
21 21 default_image_model = default_model
22 model_aliases = {"flux-schnell": default_model, "flux": default_model}
23 image_models = [default_image_model, *model_aliases.keys()]
22 model_aliases = {"flux-schnell": default_image_model, "flux": default_image_model}
23 image_models = list(model_aliases.keys())
24 24 models = image_models
25 25
26 26 @classmethod
Modified g4f/Provider/hf_space/CohereForAI_C4AI_Command.py +4 -10
@@ -17,21 +17,15 @@ class CohereForAI_C4AI_Command(AsyncGeneratorProvider, ProviderModelMixin):
17 17 working = True
18 18
19 19 default_model = "command-a-03-2025"
20 models = [
21 default_model,
22 "command-r-plus-08-2024",
23 "command-r-08-2024",
24 "command-r-plus",
25 "command-r",
26 "command-r7b-12-2024",
27 "command-r7b-arabic-02-2025",
28 ]
29 20 model_aliases = {
30 "command-a": "command-a-03-2025",
21 "command-a": default_model,
31 22 "command-r-plus": "command-r-plus-08-2024",
32 23 "command-r": "command-r-08-2024",
24 "command-r": "command-r",
33 25 "command-r7b": "command-r7b-12-2024",
34 26 }
27
28 models = list(model_aliases.keys())
35 29
36 30 @classmethod
37 31 async def create_async_generator(
Modified g4f/Provider/hf_space/DeepseekAI_JanusPro7b.py +2 -1
@@ -34,8 +34,9 @@ class DeepseekAI_JanusPro7b(AsyncGeneratorProvider, ProviderModelMixin):
34 34 default_model = "janus-pro-7b"
35 35 default_image_model = "janus-pro-7b-image"
36 36 default_vision_model = default_model
37 models = [default_model, default_image_model]
38 37 image_models = [default_image_model]
38 vision_models = [default_vision_model]
39 models = vision_models + image_models
39 40
40 41 @classmethod
41 42 def run(cls, method: str, session: StreamSession, prompt: str, conversation: JsonConversation, image: dict = None, seed: int = 0):
Modified g4f/Provider/hf_space/Microsoft_Phi_4.py +3 -1
@@ -29,7 +29,9 @@ class Microsoft_Phi_4(AsyncGeneratorProvider, ProviderModelMixin):
29 29
30 30 default_model = "phi-4-multimodal"
31 31 default_vision_model = default_model
32 models = [default_model]
32 model_aliases = {"phi-4": default_vision_model}
33 vision_models = list(model_aliases.keys())
34 models = vision_models
33 35
34 36 @classmethod
35 37 def run(cls, method: str, session: StreamSession, prompt: str, conversation: JsonConversation, media: list = None):
Modified g4f/Provider/hf_space/Qwen_QVQ_72B.py +4 -3
@@ -18,9 +18,10 @@ class Qwen_QVQ_72B(AsyncGeneratorProvider, ProviderModelMixin):
18 18 working = True
19 19
20 20 default_model = "qwen-qvq-72b-preview"
21 models = [default_model]
22 model_aliases = {"qvq-72b": default_model}
23 vision_models = models
21 default_vision_model = default_model
22 model_aliases = {"qvq-72b": default_vision_model}
23 vision_models = list(model_aliases.keys())
24 models = vision_models
24 25
25 26 @classmethod
26 27 async def create_async_generator(
Added g4f/Provider/hf_space/Qwen_Qwen_2_5.py +146 -0
Renamed g4f/Provider/hf_space/Qwen_Qwen_2_5M.py +4 -3
Added g4f/Provider/hf_space/Qwen_Qwen_2_5_Max.py +133 -0
Renamed g4f/Provider/hf_space/Qwen_Qwen_2_72B.py +3 -3
Modified g4f/Provider/hf_space/StabilityAI_SD35Large.py +2 -2
Modified g4f/Provider/hf_space/Voodoohop_Flux1Schnell.py +1 -1
Modified g4f/Provider/hf_space/__init__.py +9 -5
Modified g4f/models.py +58 -11