176 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
ea42788e8d Add validation tests and ARM64 build plan documentation
Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>
2025-08-26 22:55:36 +00:00
copilot-swe-agent[bot]
1f85c85b72 Implement Nuitka-based package building with architecture support
Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>
2025-08-26 22:53:07 +00:00
copilot-swe-agent[bot]
d900d55579 Complete build artifacts implementation with testing and documentation
Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>
2025-08-22 18:25:17 +00:00
Copilot
9f02959cfc Add comprehensive build workflow for multiple package formats (pip, winget, docker, executables, deb) (#3138)
* Add comprehensive build workflow and package configuration

Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>

* Complete build workflow implementation with documentation and testing

Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>

* Update WinGet package structure and build dependencies per feedback

Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>

* Simplify WinGet package identifier to "g4f" and add winget/* to .gitignore

Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>
2025-08-22 10:59:04 +02:00
Copilot
43898f081a Standardize reasoning field to OpenAI format while maintaining input compatibility (#3136)
* Initial plan

* Add comprehensive reasoning field standardization tests

Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>

* Standardize reasoning field to OpenAI format while maintaining input compatibility

Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>

* Rename reasoning_content parameter to reasoning for consistent naming

Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>

* Address review comments: remove hardcoded path and rename reasoning_content to reasoning

Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>
2025-08-21 16:06:36 +02:00
copilot-swe-agent[bot]
96404a9d10 Add documentation for aarch64 compatibility
Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>
2025-08-21 08:18:32 +00:00
hlohaus
affe390c60 Update link documentation 2025-04-26 23:31:10 +02:00
hlohaus
c3632984f7 feat: add audio speech generation endpoint and media handling refactor
- Added new `/v1/audio/speech` and `/api/{path_provider}/audio/speech` endpoints in `g4f/api/__init__.py` for generating speech from text
- Introduced `AudioSpeechConfig` model in `g4f/api/stubs.py` with fields for input, model, provider, voice, instructions, and response format
- Updated `PollinationsAI.py` to support `modalities` in `kwargs` when checking for audio
- Set default voice for audio models in `PollinationsAI.py` if not provided in `kwargs`
- Added debug print in `PollinationsAI.py` to log request data to text API endpoint
- Extended supported FastAPI response types in `g4f/api/__init__.py` to include `FileResponse` from `starlette.responses`
- Added `BackgroundTask` to clean up generated audio files after serving in `g4f/api/__init__.py`
- Modified `AnyProvider.py` to include `EdgeTTS`, `gTTS`, and `MarkItDown` as audio providers when `audio` is in `kwargs` or `modalities`
- Created `resolve_media` helper in `g4f/client/__init__.py` to standardize media handling for audio/image input
- Replaced manual media preprocessing in `Completions`, `AsyncCompletions`, and `Images` classes with `resolve_media`
- Added `/docs/README.md` with a link to the documentation site
2025-04-26 12:21:49 +02:00
hlohaus
80c835552d Move documentation 2025-04-25 07:13:25 +02:00
hlohaus
2e928c3b94 ```
docs: update media examples and add parameter details for TTS providers

- Updated EdgeTTS example to mention additional audio parameters (`rate`, `volume`, `pitch`)
- Updated gTTS example to include support for `tld` and `slow` audio parameters
- Modified the EdgeTTS provider to use `get_last_message` instead of `format_image_prompt` for prompt handling
- Modified the gTTS provider to use `get_last_message` instead of `format_image_prompt` for prompt handling
- Refactored audio file generation logic in the gTTS provider to handle `language` parameter and update the voice model accordingly
- Refactored backend API code to introduce `cast_str` function for processing responses, including cache management and response formatting
- Fixed a bug in `AnyProvider` where the model string check would fail if the model was `None`
- Added check in `to_string` helper function to handle `None` values correctly
```
2025-04-20 13:54:46 +02:00
hlohaus
099d7283ed feat: add gTTS provider and update EdgeTTS & media docs
- In **docs/media.md**:
  - Updated the import to include `gTTS` alongside `EdgeTTS`, `Gemini`, and `PollinationsAI`.
  - Changed the audio parameter for EdgeTTS from `"locale": "en-US"` to `"language": "en"`.
  - Added a new code example demonstrating how to use the gTTS provider and save the output as "google-tts.mp3".

- In **g4f/Provider/__init__.py**:
  - Replaced the import of `EdgeTTS` with a wildcard import (`from .audio import *`) to include all audio providers.

- In **g4f/Provider/audio/EdgeTTS.py**:
  - Added a new class attribute `model_id = "edge-tts"`.
  - Changed the voice selection logic to use `cls.model_id` instead of the hardcoded string "edge-tts".
  - Updated the filename generation to use `[cls.model_id]` instead of `[cls.default_model]`.

- In **g4f/Provider/audio/__init__.py**:
  - Added an import for the new `gTTS` provider.

- Added new file **g4f/Provider/audio/gTTS.py**:
  - Implements the gTTS provider using the `gtts` library.
  - Defines provider attributes (`label`, `working`, `model_id`, etc.) and generates audio using a similar structure to EdgeTTS.

- In **g4f/image/__init__.py**:
  - Modified the `get_extension` function to extract the extension using `.lower().lstrip('.')` instead of slicing with `[1:]`.
2025-04-19 14:40:53 +02:00
hlohaus
b68b9ff6be feat: add audio generation support for multiple providers
- Added new examples for `client.media.generate` with `PollinationsAI`, `EdgeTTS`, and `Gemini` in `docs/media.md`
- Modified `PollinationsAI.py` to default to `default_audio_model` when audio data is present
- Adjusted `PollinationsAI.py` to conditionally construct message list from `prompt` when media is being generated
- Rearranged `PollinationsAI.py` response handling to yield `save_response_media` after checking for non-JSON content types
- Added support in `EdgeTTS.py` to use default values for `language`, `locale`, and `format` from class attributes
- Improved voice selection logic in `EdgeTTS.py` to fallback to default locale or language when not explicitly provided
- Updated `EdgeTTS.py` to yield `AudioResponse` with `text` field included
- Modified `Gemini.py` to support `.ogx` audio generation when `model == "gemini-audio"` or `audio` is passed
- Used `format_image_prompt` in `Gemini.py` to create audio prompt and saved audio file using `synthesize`
- Appended `AudioResponse` to `Gemini.py` for audio generation flow
- Added `save()` method to `Image` class in `stubs.py` to support saving `/media/` files locally
- Changed `client/__init__.py` to fallback to `options["text"]` if `alt` is missing in `Images.create`
- Ensured `AudioResponse` in `copy_images.py` includes the `text` (prompt) field
- Added `Annotated` fallback definition in `api/__init__.py` for compatibility with older Python versions
2025-04-19 06:23:46 +02:00
hlohaus
e83282fc4b feat: add EdgeTTS audio provider and global image→media refactor
- **Docs**
  - `docs/file.md`: update upload instructions to use inline `bucket` content parts instead of `tool_calls/bucket_tool`.
  - `docs/media.md`: add asynchronous audio transcription example, detailed explanation, and notes.

- **New audio provider**
  - Add `g4f/Provider/audio/EdgeTTS.py` implementing Edge Text‑to‑Speech (`EdgeTTS`).
  - Create `g4f/Provider/audio/__init__.py` for provider export.
  - Register provider in `g4f/Provider/__init__.py`.

- **Refactor image → media**
  - Introduce `generated_media/` directory and `get_media_dir()` helper in `g4f/image/copy_images.py`; add `ensure_media_dir()`; keep back‑compat with legacy `generated_images/`.
  - Replace `images_dir` references with `get_media_dir()` across:
    - `g4f/api/__init__.py`
    - `g4f/client/stubs.py`
    - `g4f/gui/server/api.py`
    - `g4f/gui/server/backend_api.py`
    - `g4f/image/copy_images.py`
  - Rename CLI/API config field/flag from `image_provider` to `media_provider` (`g4f/cli.py`, `g4f/api/__init__.py`, `g4f/client/__init__.py`).
  - Extend `g4f/image/__init__.py`
    - add `MEDIA_TYPE_MAP`, `get_extension()`
    - revise `is_allowed_extension()`, `to_input_audio()` to support wider media types.

- **Provider adjustments**
  - `g4f/Provider/ARTA.py`: swap `raise_error()` parameter order.
  - `g4f/Provider/Cloudflare.py`: drop unused `MissingRequirementsError` import; move `get_args_from_nodriver()` inside try; handle `FileNotFoundError`.

- **Core enhancements**
  - `g4f/providers/any_provider.py`: use `default_model` instead of literal `"default"`; broaden model/provider matching; update model list cleanup.
  - `g4f/models.py`: safeguard provider count logic when model name is falsy.
  - `g4f/providers/base_provider.py`: catch `json.JSONDecodeError` when reading auth cache, delete corrupted file.
  - `g4f/providers/response.py`: allow `AudioResponse` to accept extra kwargs.

- **Misc**
  - Remove obsolete `g4f/image.py`.
  - `g4f/Provider/Cloudflare.py`, `g4f/client/types.py`: minor whitespace and import tidy‑ups.
2025-04-19 03:20:57 +02:00
hlohaus
24cdaea3d6 Fix typo 2025-04-08 19:07:24 +02:00
hlohaus
c083f85206 feat: improve file handling and streamline provider implementations
- Added file upload usage example with bucket_id in docs/file.md
- Fixed ARTA provider by refactoring error handling with a new raise_error function
- Simplified aspect_ratio handling in ARTA with proper default
- Improved AllenAI provider by cleaning up image handling logic
- Fixed Blackbox provider's media handling to properly process images
- Updated file tools to handle URL downloads correctly
- Fixed bucket_id pattern matching in ToolHandler.process_bucket_tool
- Cleaned up imports in typing.py by removing unnecessary sys import
- Fixed inconsistent function parameters in g4f/tools/files.py
- Fixed return value of upload_and_process function to return bucket_id
2025-04-08 19:00:44 +02:00
kqlio67
54ef1a511c docs: update providers documentation and enhance support for Blackbox HAR auth
- Added "No auth / HAR file" authentication type in providers-and-models.md
- Added "Video generation" column to provider tables for future capability
- Updated model counts and provider capabilities throughout documentation
- Fixed ARTA provider with improved error handling and response validation
- Enhanced AllenAI provider with vision model support and proper image handling
- Significantly improved Blackbox provider:
  - Added HAR file authentication support
  - Added subscription status checking
  - Added premium/demo model differentiation
  - Improved session handling and error recovery
- Enhanced DDG provider with better error handling for challenges
- Improved PollinationsAI and PollinationsImage providers' model handling
- Added VideoModel class in g4f/models.py
- Added audio/video generation indicators in GUI components
- Added new Ai2 models: olmo-1-7b, olmo-2-32b, olmo-4-synthetic
- Added new commit message generation tool in etc/tool/commit.py
2025-04-04 13:36:28 +03:00
hlohaus
d38755b42a Code review changes 2025-03-30 17:57:42 +02:00
hlohaus
8c2c46b20f Support "Think Deeper" in Copilot
Improve Documentation
2025-03-30 15:40:46 +02:00
hlohaus
fa17ce1bd6 Delete buckets with the conversation
Fix lightbox for uploaded images
Fix save media content
Fix TypeGPT and Cloudflare provider
2025-03-29 11:22:22 +01:00
hlohaus
46d0b87008 Add example for video generation
Add support for images in messages
2025-03-27 09:38:31 +01:00
kqlio67
29139b1172 Add Blackbox AI Pro model and fix URL redirect format in backend_api.py 2025-03-26 18:18:01 +02:00
kqlio67
97f1964bb6 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 <>
2025-03-22 10:49:25 +01:00
hlohaus
8f6efd5366 Update docs: Using the OpenAI Library
Add sse function to requests sessions
Small improvments in OpenaiChat and ARTA provider
2025-03-22 07:32:30 +01:00
hlohaus
fa2344b031 Update openai example in docs, add default api_key 2025-03-21 06:22:38 +01:00
hlohaus
c97ba0c88e Add audio transcribing example and support
Add Grok Chat provider
Rename images parameter to media
Update demo homepage
2025-03-21 03:17:45 +01:00
kqlio67
52ecfb5019 Add new providers and enhance existing provider configurations (#2805)
* New provider added(g4f/Provider/Websim.py)

* New provider added(g4f/Provider/Dynaspark.py)

* feat(g4f/gui/client/static/js/chat.v1.js): Enhance provider labeling for HuggingFace integrations

* feat(g4f/gui/server/api.py): add Hugging Face Space compatibility flag to provider data

* feat(g4f/models.py): add new providers and update model configurations

* Update g4f/Provider/__init__.py

* feat(g4f/Provider/AllenAI.py): expand model alias mappings for AllenAI provider

* feat(g4f/Provider/Blackbox.py): restructure image model handling and response processing

* feat(g4f/Provider/PollinationsAI.py): add new model aliases and streamline headers

* Update g4f/Provider/hf_space/*

* refactor(g4f/Provider/Copilot.py): update model alias mapping

* chore(g4f/models.py): update provider configurations for OpenAI models

* docs(docs/providers-and-models.md): update provider tables and model categorization

* fix(etc/examples/vision_images.py): update model and simplify client configuration

* fix(docs/providers-and-models.md): correct streaming status for GlhfChat provider

* docs(docs/providers-and-models.md): update provider capabilities and model documentation

* fix(models): update provider configurations for Mistral models

* fix(g4f/Provider/Blackbox.py): correct model alias key for Mistral variant

* feat(g4f/Provider/hf_space/CohereForAI_C4AI_Command.py): update supported model versions and aliases (close #2802)

* fix(documentation): correct model names and provider counts (https://github.com/xtekky/gpt4free/pull/2805#issuecomment-2727489835)

* fix(g4f/models.py): correct mistral model configurations

* fix(g4f/Provider/DeepInfraChat.py): correct mixtral-small alias key

* New provider added(g4f/Provider/LambdaChat.py)

* feat(g4f/models.py): add new providers and enhance model configurations

* docs(docs/providers-and-models.md): add LambdaChat provider and update model listings

* feat(g4f/models.py): add new Liquid AI model and enhance providers

* docs(docs/providers-and-models.md): update model listings and provider counts

* feat(g4f/Provider/LambdaChat.py): add conditional reasoning processing based on model

* fix(g4f/tools/run_tools.py): handle combined thinking tags in single chunk

* New provider added(g4f/Provider/Goabror.py)

* feat(g4f/Provider/Blackbox.py): implement dynamic session management and model access control

* refactor(g4f/models.py): update provider configurations and model entries

* docs(docs/providers-and-models.md): update model listings and provider counts

---------

Co-authored-by: kqlio67 <>
2025-03-20 17:36:00 +01:00
hlohaus
3e7af90949 Add ARTA image provider
Add ToolSupport in PollinationsAI provider
Add default value for model in chat completions
Add Streaming Support for PollinationsAI provider
2025-03-11 02:49:24 +01:00
kqlio67
c79635aaeb Update models and providers with improved documentation and code structure (#2786)
* docs(docs/providers-and-models.md): update documentation structure and model listings

* refactor(g4f/debug.py): add type hints and docstrings

* refactor(g4f/tools/run_tools.py): Restructure tool handling and improve modularity

* refactor(g4f/providers/response.py): enhance type hints and code documentation

* feat(g4f/models.py): Update model providers and add new models

* feat(g4f/Provider/Blackbox.py): add encrypted session handling and model updates

* fix(g4f/Provider/ChatGptEs.py): migrate to curl_cffi for request handling and improve error resilience

* feat(g4f/Provider/DeepInfraChat.py): Update default model and add new DeepSeek variants

* feat(g4f/Provider/Free2GPT.py): add Gemini models and streamline headers

* feat(g4f/Provider/FreeGpt.py): Add support for Gemini 1.5 Flash model

* feat(g4f/Provider/Liaobots.py): Add Claude 3.7 models and update default GPT-4o

* fix(g4f/Provider/PollinationsAI.py): Correct model mappings and generation parameters

* feat(g4f/Provider/PollinationsImage.py): Add class identifier label

* chore(g4f/Provider/TeachAnything.py): Update default model and simplify model handling

* (g4f/Provider/Mhystical.py): Remove class implementation

* chore(g4f/Provider/Prodia.py > g4f/Provider/not_working/Prodia.py): mark Prodia provider as non-working

* feat(g4f/Provider/Blackbox.py): Add Claude 3.7 Sonnet model alias

* chore(g4f/models.py): Update model configurations

* fix(g4f/Provider/ChatGptEs.py): improve request reliability and nonce detection

---------

Co-authored-by: kqlio67 <>
2025-03-09 19:46:27 +01:00
hlohaus
6ce2875a74 Add ToolSupportProvider 2025-03-01 10:25:51 +01:00
hlohaus
d9f90ff8bb Add ToolSupportProvider 2025-03-01 10:17:27 +01:00
hlohaus
a0e8559fc3 Add ToolSupportProvider 2025-03-01 10:16:39 +01:00
hlohaus
989f02fc31 Add ToolSupportProvider 2025-03-01 01:46:04 +01:00
hlohaus
510d9d9bcd Add LangChain Documenation Example 2025-02-28 00:14:29 +01:00
kqlio67
07a8dfdff7 AI Provider and Model Updates: Adding New, Removing Deprecated, and Enhancing Functionality (#2739)
* docs(docs/providers-and-models.md): Update provider listings and model information

* feat(g4f/models.py): update model configurations and expand provider support

* fix(g4f/gui/client/static/js/chat.v1.js): correct provider checkbox initialization logic

* feat(g4f/Provider/Blackbox.py): update model configurations and premium handling

* feat(g4f/Provider/ChatGLM.py): add finish reason handling and update default model

* chore(g4f/Provider/DDG.py): Reorder model entries for consistency

* feat(g4f/Provider/ImageLabs.py): Update default image model to sdxl-turbo

* feat(g4f/Provider/Liaobots.py): update supported model configurations and aliases

* feat(g4f/Provider/OIVSCode.py): Update API endpoint and expand model support

* fix(g4f/Provider/needs_auth/CablyAI.py): Enforce authentication requirement

* Removed the provider (g4f/Provider/BlackboxAPI.py)

* fix(g4f/providers/base_provider.py): improve cache validation in AsyncAuthedProvider

* Update g4f/models.py

* fix(g4f/Provider/Liaobots.py): remove deprecated Gemini model aliases

* chore(g4f/models.py): Remove Grok-2 and update Gemini provider configurations

* chore(docs/providers-and-models.md): Remove deprecated Grok models from provider listings

* New provider added (g4f/Provider/AllenAI.py)

* feat(g4f/models.py): Add Ai2 models and update provider references

* feat(docs/providers-and-models.md): update providers and models documentation

* fix(g4f/models.py): update experimental model provider configuration

* fix(g4f/Provider/PollinationsImage.py): Initialize image_models list and update label

* fix(g4f/Provider/PollinationsAI.py): Resolve model initialization and alias conflicts

* refactor(g4f/Provider/PollinationsAI.py): improve model initialization and error handling

* refactor(g4f/Provider/PollinationsImage.py): Improve model synchronization and initialization

* Update g4f/Provider/AllenAI.py

---------

Co-authored-by: kqlio67 <>
2025-02-24 15:53:20 +01:00
whoa-mi
9a7ea2634d Update interference-api.md
fix selecting provider link
2025-02-24 14:39:15 +09:00
hlohaus
cdefc324d7 Update docs 2025-02-22 13:23:24 +01:00
hlohaus
357a3bd4fb Rename apply_patch function in pydantic_ai 2025-02-22 04:58:05 +01:00
H Lohaus
a5a7458721 Update pydantic_ai.md 2025-02-21 10:06:35 +01:00
H Lohaus
229fc0e6e8 Update requirements.md 2025-02-21 09:56:20 +01:00
H Lohaus
40c6132c06 Update requirements.md 2025-02-21 09:55:41 +01:00
H Lohaus
509933f7b3 Update legacy.md 2025-02-21 09:53:56 +01:00
hlohaus
e632ef4ac1 Fix import for Agent 2025-02-21 08:43:28 +01:00
hlohaus
1d7155d28b Fix import for Agent 2025-02-21 08:40:49 +01:00
hlohaus
bc6262cc79 Add Documentaion for PydanticAI support 2025-02-21 08:39:04 +01:00
Arken1xs
68414ece4c Small fixes and updates around various providers (#2717)
* Update DDG.py: added Llama 3.3 Instruct and o3-mini

Duck.ai now supports o3-mini, and previous Llama 3.1 70B is now replaced by Llama 3.3 70B.

* Update DDG.py: change Llama 3.3 70B Instruct ID to "meta-llama/Llama-3.3-70B-Instruct-Turbo"

Fixed typo in full model name

* Update Cerebras.py: add "deepseek-r1-distill-llama-70b" to the models list

Cerebras now provides inference for a DeepSeek-R1 distilled to Llama 3.3 70B as well.

* Update models.py: reflect changes in DDG provider

- Removed DDG from best providers list for Llama 3.1 70B
- Added DDG to best providers list for o3-mini and Llama 3.3 70B

* A small update in HuggingFaceInference get_models() method

Previously, get_models() method was returning "TypeError: string indices must be integers, not 'str' on line 31" from time to time, possibly because of network error so the models list couldn't load and method was trying to parse this data. Now the code is updated in order to check for any potential errors first.

* Update BlackboxAPI.py: remove unused imports 

format_prompt() and JSON library are not being used here, so they may be removed safely.

* Update copilot.yml

This job is failing due to the error in JavaScript code; this commit is trying to fix it.

* Update providers-and-models.md to reflect latest changes

Updated models list and removed providers that are currently not working.
2025-02-19 16:34:30 +01:00
kqlio67
b1de624963 fix(g4f/Provider/PollinationsAI.py): Remove duplicate model alias 2025-02-10 19:50:35 +02:00
kqlio67
d678255397 feat(g4f/Provider/Blackbox.py): add premium model support and validation 2025-02-10 15:44:37 +02:00
kqlio67
a7f19ea588 refactor(g4f/Provider/CablyAI.py > g4f/Provider/needs_auth/CablyAI.py): restructure provider and simplify model handling 2025-02-10 13:35:20 +02:00
kqlio67
59c65a096f feat(g4f/Provider/Blackbox.py): Add Gemini-Flash-2.0 model and improve premium handling 2025-02-07 19:50:21 +02:00
kqlio67
88e7ef98f0 Adding New Models and Enhancing Provider Functionality (#2689)
* Adding New Models and Enhancing Provider Functionality

* fix(core): handle model errors and improve configuration

- Import ModelNotSupportedError for proper exception handling in model resolution
- Update login_url configuration to reference class URL attribute dynamically
- Remove redundant typing imports after internal module reorganization

* feat(g4f/Provider/PerplexityLabs.py): Add new Perplexity models and update provider listings

- Update PerplexityLabs provider with expanded Sonar model family including pro/reasoning variants
- Add new text models: sonar-reasoning-pro to supported model catalog
- Standardize model naming conventions across provider documentation

* feat(g4f/models.py): add Sonar Reasoning Pro model configuration

- Add new  model to Perplexity AI text models section
- Include model in ModelUtils.convert mapping with PerplexityLabs provider
- Maintain consistent configuration pattern with existing Sonar variants

* feat(docs/providers-and-models.md): update provider models and add new reasoning model

- Update PerplexityLabs text models to standardized sonar naming convention
- Add new sonar-reasoning-pro model to text models table
- Include latest Perplexity AI documentation references for new model

* docs(docs/providers-and-models.md): update AI providers documentation

- Remove deprecated chatgptt.me from no-auth providers list
- Delete redundant Auth column from HuggingSpace providers table
- Update PerplexityLabs model website URLs to sonar.perplexity.ai
- Adjust provider counts for GPT-4/GPT-4o models in text models section
- Fix inconsistent formatting in image models provider listings

* chore(g4f/models.py): remove deprecated ChatGptt provider integration

- Remove ChatGptt import from provider dependencies
- Exclude ChatGptt from default model's best_provider list
- Update gpt_4 model configuration to eliminate ChatGptt reference
- Modify gpt_4o vision model provider hierarchy
- Adjust gpt_4o_mini provider selection parameters

BREAKING CHANGE: Existing integrations using ChatGptt provider will no longer function

* Disabled provider (g4f/Provider/ChatGptt.py > g4f/Provider/not_working/ChatGptt.py): Problem with Cloudflare

* fix(g4f/Provider/CablyAI.py): update API endpoints and model configurations

* docs(docs/providers-and-models.md): update model listings and provider capabilities

* feat(g4f/models.py): Add Hermes-3 model and enhance provider configs

* feat(g4f/Provider/CablyAI.py): Add free tier indicators to model aliases

* refactor(g4f/tools/run_tools.py): modularize thinking chunk handling

* fix(g4f/Provider/DeepInfraChat.py): resolve duplicate keys and enhance request headers

* feat(g4f/Provider/DeepInfraChat.py): Add multimodal image support and improve model handling

* chore(g4f/models.py): update default vision model providers

* feat(docs/providers-and-models.md): update provider capabilities and model specifications

* Update docs/client.md

* docs(docs/providers-and-models.md): Update DeepInfraChat models documentation

* feat(g4f/Provider/DeepInfraChat.py): add new vision models and expand model aliases

* feat(g4f/models.py): update model configurations and add new providers

* feat(g4f/models.py): Update model configurations and add new AI models

---------

Co-authored-by: kqlio67 <>
2025-02-07 13:54:00 +01:00