The official gpt4free repository | various collection of powerful language models | opus 4.6 gpt 5.3 kimi 2.5 deepseek v3.2 gemini 3
1207 matches across 19 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | g4f/cookies.py | 1 | |
| LOW | g4f/files.py | 1 | |
| LOW | g4f/config.py | 1 | |
| LOW | g4f/version.py | 1 | |
| LOW | g4f/models.py | 1 | |
| LOW | g4f/models.py | 7 | |
| LOW | g4f/__init__.py | 1 | |
| LOW | g4f/__init__.py | 7 | |
| LOW | g4f/__init__.py | 7 | |
| LOW | g4f/__init__.py | 10 | |
| LOW | g4f/__init__.py | 10 | |
| LOW | g4f/__init__.py | 10 | |
| LOW | g4f/__init__.py | 10 | |
| LOW | g4f/__init__.py | 12 | |
| LOW | g4f/__init__.py | 12 | |
| LOW | g4f/__init__.py | 16 | |
| LOW | g4f/typing.py | 1 | |
| LOW | g4f/typing.py | 4 | |
| LOW | g4f/typing.py | 4 | |
| LOW | g4f/typing.py | 4 | |
| LOW | g4f/typing.py | 4 | |
| LOW | g4f/tools/auth.py | 1 | |
| LOW | g4f/tools/files.py | 1 | |
| LOW | g4f/tools/files.py | 77 | |
| LOW | g4f/tools/fetch_and_scrape.py | 1 | |
| LOW | g4f/tools/media.py | 1 | |
| LOW | g4f/tools/run_tools.py | 1 | |
| LOW | g4f/tools/web_search.py | 1 | |
| LOW | g4f/integration/langchain.py | 1 | |
| LOW | g4f/integration/pydantic_ai.py | 1 | |
| LOW | g4f/providers/config_provider.py | 54 | |
| LOW | g4f/providers/retry_provider.py | 1 | |
| LOW | g4f/providers/retry_provider.py | 8 | |
| LOW | g4f/providers/retry_provider.py | 12 | |
| LOW | g4f/providers/retry_provider.py | 12 | |
| LOW | g4f/providers/base_provider.py | 1 | |
| LOW | g4f/providers/base_provider.py | 16 | |
| LOW | g4f/providers/base_provider.py | 18 | |
| LOW | g4f/providers/base_provider.py | 20 | |
| LOW | g4f/providers/asyncio.py | 1 | |
| LOW | g4f/providers/create_images.py | 1 | |
| LOW | g4f/providers/response.py | 1 | |
| LOW | g4f/providers/types.py | 1 | |
| LOW | g4f/providers/types.py | 3 | |
| LOW | g4f/providers/types.py | 5 | |
| LOW | g4f/providers/types.py | 5 | |
| LOW | g4f/providers/helper.py | 1 | |
| LOW | g4f/providers/any_provider.py | 1 | |
| LOW | g4f/providers/tool_support.py | 1 | |
| LOW | g4f/providers/tool_support.py | 11 | |
| LOW | g4f/Provider/PollinationsAI.py | 1 | |
| LOW | g4f/Provider/Mintlify.py | 1 | |
| LOW | g4f/Provider/Mintlify.py | 9 | |
| LOW | g4f/Provider/Mintlify.py | 10 | |
| LOW | g4f/Provider/Mintlify.py | 11 | |
| LOW | g4f/Provider/OperaAria.py | 1 | |
| LOW | g4f/Provider/OperaAria.py | 17 | |
| LOW | g4f/Provider/GLM.py | 1 | |
| LOW | g4f/Provider/base_provider.py | 1 | |
| LOW | g4f/Provider/base_provider.py | 2 | |
| 378 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | g4f/cookies.py | 150 | except Exception as e: |
| LOW | g4f/cookies.py | 272 | except Exception as e: |
| LOW | g4f/version.py | 141 | except Exception as e: |
| LOW | g4f/tools/files.py | 63 | except Exception: |
| LOW | g4f/tools/files.py | 443 | except Exception as e: |
| LOW | g4f/tools/files.py | 565 | except Exception as e: |
| LOW | g4f/tools/files.py | 578 | except Exception as e: |
| LOW | g4f/tools/run_tools.py | 235 | except Exception as e: |
| LOW | g4f/tools/run_tools.py | 350 | except Exception: |
| LOW | g4f/tools/run_tools.py | 418 | except Exception as e: |
| LOW | g4f/tools/run_tools.py | 523 | except Exception: |
| LOW | g4f/integration/markitdown/_llm_caption.py | 25 | except Exception as e: |
| LOW | g4f/integration/markitdown/__init__.py | 98 | except Exception: |
| LOW | g4f/integration/markitdown/_youtube_converter.py | 114 | except Exception as e: |
| MEDIUM | g4f/integration/markitdown/_youtube_converter.py | 115 | print(f"Error extracting description: {e}") |
| LOW | g4f/integration/markitdown/_youtube_converter.py | 177 | except Exception as e: |
| MEDIUM | g4f/integration/markitdown/_youtube_converter.py | 180 | print(f"Error fetching transcript: {e}") |
| LOW | g4f/integration/markitdown/_youtube_converter.py | 191 | except Exception as e: |
| MEDIUM | g4f/integration/markitdown/_youtube_converter.py | 192 | print(f"Error processing transcript: {e}") |
| LOW | g4f/integration/markitdown/_youtube_converter.py | 236 | except Exception as e: |
| LOW | g4f/providers/config_provider.py | 389 | except Exception as e: |
| LOW | g4f/providers/config_provider.py | 466 | except Exception as e: |
| LOW | g4f/providers/config_provider.py | 571 | except Exception as e: |
| LOW | g4f/providers/retry_provider.py | 124 | except Exception as e: |
| LOW | g4f/providers/retry_provider.py | 183 | except Exception as e: |
| LOW | g4f/providers/retry_provider.py | 240 | except Exception as e: |
| LOW | g4f/providers/asyncio.py | 56 | except Exception: |
| LOW | g4f/providers/any_provider.py | 217 | except Exception as e: |
| LOW | g4f/providers/any_provider.py | 236 | except Exception as e: |
| LOW | g4f/providers/any_provider.py | 296 | except Exception as e: |
| LOW | g4f/providers/any_provider.py | 509 | except Exception as e: |
| LOW | g4f/providers/tool_support.py | 110 | except Exception: |
| LOW | g4f/providers/tool_support.py | 121 | except Exception: |
| LOW | g4f/providers/tool_support.py | 151 | except Exception: |
| LOW | g4f/Provider/PollinationsAI.py | 90 | except Exception as e: |
| LOW | g4f/Provider/PollinationsAI.py | 132 | except Exception as e: |
| LOW | g4f/Provider/PollinationsAI.py | 197 | except Exception as e: |
| LOW | g4f/Provider/PollinationsAI.py | 393 | except Exception as e: |
| LOW | g4f/Provider/OperaAria.py | 250 | except Exception as e: |
| LOW | g4f/Provider/WeWordle.py | 70 | except Exception as e: |
| LOW | g4f/Provider/WeWordle.py | 153 | except Exception as e: |
| LOW | g4f/Provider/TeachAnything.py | 60 | except Exception as e: |
| MEDIUM | g4f/Provider/TeachAnything.py | 61 | print(f"Error decoding final buffer: {e}") |
| LOW | g4f/Provider/CopilotSession.py | 175 | except Exception: |
| LOW | g4f/Provider/Copilot.py | 257 | except Exception as e: |
| LOW | g4f/Provider/Copilot.py | 290 | except Exception: |
| LOW | g4f/Provider/Perplexity.py | 182 | except Exception as e: |
| LOW | g4f/Provider/Yupp.py | 146 | except Exception as e: |
| LOW | g4f/Provider/Yupp.py | 198 | except Exception as e: |
| LOW | g4f/Provider/Yupp.py | 238 | except Exception as e: |
| LOW | g4f/Provider/Yupp.py | 272 | except Exception as e: |
| LOW | g4f/Provider/Yupp.py | 298 | except Exception as e: |
| LOW | g4f/Provider/Yupp.py | 734 | except Exception as e: |
| LOW | g4f/Provider/Chatai.py | 132 | except Exception as e: |
| LOW | g4f/Provider/Chatai.py | 136 | except Exception as e: |
| LOW | g4f/Provider/Qwen.py | 401 | except Exception as e: |
| LOW | g4f/Provider/EasyChat.py | 153 | except Exception as e: |
| LOW | g4f/Provider/hf_space/raise_for_status.py | 18 | except Exception: |
| LOW | g4f/Provider/template/OpenaiTemplate.py | 113 | except Exception as e: |
| LOW | g4f/Provider/qwen/qwenOAuth2.py | 98 | except Exception: |
| 230 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | g4f/providers/config_provider.py | 76 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/providers/config_provider.py | 78 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/providers/config_provider.py | 127 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/providers/config_provider.py | 129 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/providers/config_provider.py | 172 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/providers/config_provider.py | 174 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/providers/config_provider.py | 335 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/providers/config_provider.py | 337 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/providers/config_provider.py | 364 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/providers/config_provider.py | 366 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/providers/config_provider.py | 433 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/providers/config_provider.py | 435 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/Provider/qwen/cookie_generator.py | 462 | # ----------------------- |
| MEDIUM | g4f/Provider/qwen/cookie_generator.py | 464 | # ----------------------- |
| MEDIUM | g4f/Provider/qwen/generate_ua.py | 10 | # ========================= |
| MEDIUM | g4f/Provider/qwen/generate_ua.py | 12 | # ========================= |
| MEDIUM | g4f/Provider/qwen/generate_ua.py | 44 | # ========================= |
| MEDIUM | g4f/Provider/qwen/generate_ua.py | 46 | # ========================= |
| MEDIUM | g4f/Provider/qwen/generate_ua.py | 143 | # ========================= |
| MEDIUM | g4f/Provider/qwen/generate_ua.py | 145 | # ========================= |
| MEDIUM | g4f/Provider/qwen/generate_ua.py | 238 | # ========================= |
| MEDIUM | g4f/Provider/qwen/generate_ua.py | 240 | # ========================= |
| MEDIUM | g4f/Provider/qwen/fingerprint.py | 5 | # ========================= |
| MEDIUM | g4f/Provider/qwen/fingerprint.py | 7 | # ========================= |
| MEDIUM | g4f/Provider/qwen/fingerprint.py | 38 | # ========================= |
| MEDIUM | g4f/Provider/qwen/fingerprint.py | 40 | # ========================= |
| MEDIUM | g4f/Provider/qwen/fingerprint.py | 93 | # ========================= |
| MEDIUM | g4f/Provider/qwen/fingerprint.py | 95 | # ========================= |
| MEDIUM | g4f/Provider/qwen/fingerprint.py | 107 | # ========================= |
| MEDIUM | g4f/Provider/qwen/fingerprint.py | 109 | # ========================= |
| MEDIUM | g4f/mcp/pa_provider.py | 71 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/mcp/pa_provider.py | 73 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/mcp/pa_provider.py | 82 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/mcp/pa_provider.py | 84 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/mcp/pa_provider.py | 119 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/mcp/pa_provider.py | 121 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/mcp/pa_provider.py | 137 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/mcp/pa_provider.py | 139 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/mcp/pa_provider.py | 325 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/mcp/pa_provider.py | 327 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/mcp/pa_provider.py | 365 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/mcp/pa_provider.py | 367 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/mcp/pa_provider.py | 467 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/mcp/pa_provider.py | 469 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/mcp/pa_provider.py | 536 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/mcp/pa_provider.py | 538 | # --------------------------------------------------------------------------- |
| MEDIUM | g4f/mcp/pa_provider.py | 565 | # ------------------------------------------------------------------ |
| MEDIUM | g4f/mcp/pa_provider.py | 567 | # ------------------------------------------------------------------ |
| MEDIUM | g4f/mcp/pa_provider.py | 578 | # ------------------------------------------------------------------ |
| MEDIUM | g4f/mcp/pa_provider.py | 580 | # ------------------------------------------------------------------ |
| MEDIUM | g4f/cli/__init__.py | 32 | # -------------------------------------------------------------- |
| MEDIUM | g4f/cli/__init__.py | 34 | # -------------------------------------------------------------- |
| MEDIUM | g4f/cli/__init__.py | 192 | # -------------------------------------------------------------- |
| MEDIUM | g4f/cli/__init__.py | 194 | # -------------------------------------------------------------- |
| MEDIUM | g4f/cli/__init__.py | 249 | # -------------------------------------------------------------- |
| MEDIUM | g4f/cli/__init__.py | 251 | # -------------------------------------------------------------- |
| MEDIUM | g4f/cli/__init__.py | 286 | # -------------------------------------------------------------- |
| MEDIUM | g4f/cli/__init__.py | 288 | # -------------------------------------------------------------- |
| MEDIUM | etc/unittest/config_provider.py | 69 | # --------------------------------------------------------------------------- |
| MEDIUM | etc/unittest/config_provider.py | 71 | # --------------------------------------------------------------------------- |
| 9 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | g4f/cookies.py | 119 | |
| LOW | g4f/cookies.py | 178 | |
| LOW | g4f/cookies.py | 215 | |
| LOW | g4f/tools/files.py | 89 | |
| LOW | g4f/tools/files.py | 149 | |
| LOW | g4f/tools/files.py | 231 | |
| LOW | g4f/tools/files.py | 286 | |
| LOW | g4f/tools/files.py | 357 | |
| LOW | g4f/tools/files.py | 490 | |
| LOW | g4f/tools/files.py | 504 | |
| LOW | g4f/tools/files.py | 516 | |
| LOW | g4f/tools/files.py | 528 | |
| LOW | g4f/tools/fetch_and_scrape.py | 21 | |
| LOW | g4f/tools/media.py | 57 | |
| LOW | g4f/tools/run_tools.py | 241 | |
| LOW | g4f/tools/run_tools.py | 359 | |
| LOW | g4f/tools/run_tools.py | 531 | |
| LOW | g4f/tools/run_tools.py | 118 | |
| LOW | g4f/tools/run_tools.py | 157 | |
| LOW | g4f/integration/markitdown/__init__.py | 32 | |
| LOW | g4f/integration/markitdown/_audio_converter.py | 49 | |
| LOW | g4f/integration/markitdown/_youtube_converter.py | 70 | |
| LOW | g4f/integration/markitdown/_youtube_converter.py | 215 | |
| LOW | g4f/providers/config_provider.py | 256 | |
| LOW | g4f/providers/config_provider.py | 506 | |
| LOW | g4f/providers/retry_provider.py | 79 | |
| LOW | g4f/providers/retry_provider.py | 150 | |
| LOW | g4f/providers/retry_provider.py | 217 | |
| LOW | g4f/providers/base_provider.py | 118 | |
| LOW | g4f/providers/base_provider.py | 309 | |
| LOW | g4f/providers/base_provider.py | 381 | |
| LOW | g4f/providers/base_provider.py | 126 | |
| LOW | g4f/providers/asyncio.py | 20 | |
| LOW | g4f/providers/asyncio.py | 46 | |
| LOW | g4f/providers/create_images.py | 70 | |
| LOW | g4f/providers/helper.py | 12 | |
| LOW | g4f/providers/helper.py | 70 | |
| LOW | g4f/providers/any_provider.py | 174 | |
| LOW | g4f/providers/any_provider.py | 341 | |
| LOW | g4f/providers/any_provider.py | 440 | |
| LOW | g4f/providers/tool_support.py | 19 | |
| LOW | g4f/Provider/PollinationsAI.py | 95 | |
| LOW | g4f/Provider/PollinationsAI.py | 212 | |
| LOW | g4f/Provider/PollinationsAI.py | 311 | |
| LOW | g4f/Provider/Mintlify.py | 65 | |
| LOW | g4f/Provider/OperaAria.py | 210 | |
| LOW | g4f/Provider/GLM.py | 136 | |
| LOW | g4f/Provider/GLM.py | 193 | |
| LOW | g4f/Provider/WeWordle.py | 44 | |
| LOW | g4f/Provider/CopilotSession.py | 30 | |
| LOW | g4f/Provider/CopilotSession.py | 68 | |
| LOW | g4f/Provider/Copilot.py | 47 | |
| LOW | g4f/Provider/Copilot.py | 330 | |
| LOW | g4f/Provider/Copilot.py | 403 | |
| LOW | g4f/Provider/Copilot.py | 123 | |
| LOW | g4f/Provider/LambdaChat.py | 40 | |
| LOW | g4f/Provider/Perplexity.py | 108 | |
| LOW | g4f/Provider/Cloudflare.py | 93 | |
| LOW | g4f/Provider/Yupp.py | 533 | |
| LOW | g4f/Provider/Yupp.py | 763 | |
| 133 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | g4f/cookies.py | 119 | def load_cookies_from_browsers(domain_name: str, |
| LOW | g4f/tools/files.py | 262 | def stream_read_parts_and_refine(bucket_dir: Path, delete_files: bool = False) -> Iterator[str]: |
| LOW | g4f/tools/files.py | 286 | def split_file_by_size_and_newline(input_filename, output_dir, chunk_size_bytes=1024*1024): # 1MB |
| LOW | g4f/tools/files.py | 516 | async def async_read_and_download_urls(bucket_dir: Path, delete_files: bool = False, event_stream: bool = False) -> Asyn |
| LOW | g4f/integration/langchain.py | 10 | def new_convert_message_to_dict(message: BaseMessage) -> dict: |
| LOW | g4f/providers/base_provider.py | 88 | def get_async_provider_method(provider: type) -> Optional[callable]: |
| LOW | g4f/Provider/GLM.py | 29 | def create_signature_with_timestamp(cls,e: str, t: str): |
| LOW | g4f/Provider/GLM.py | 181 | def get_last_user_message_content(cls, messages): |
| LOW | g4f/Provider/Copilot.py | 330 | async def get_access_token_and_cookies(url: str, proxy: str = None, needs_auth: bool = False): |
| LOW | g4f/Provider/Yupp.py | 160 | def sync_record_model_feedback( |
| LOW | g4f/Provider/qwen/fingerprint.py | 189 | def generate_fingerprint_batch(count: int, options: Dict[str, Any] = None) -> List[str]: |
| LOW | g4f/Provider/yupp/models.py | 184 | class DataManager: |
| LOW | g4f/Provider/yupp/token_extractor.py | 334 | def _extract_tokens_from_html(self, html: str) -> List[str]: |
| LOW | g4f/Provider/needs_auth/MicrosoftDesigner.py | 145 | async def get_access_token_and_user_agent(url: str, proxy: str = None): |
| LOW | g4f/Provider/needs_auth/BlackboxPro.py | 2092 | def _find_session_in_har_files(cls) -> Optional[dict]: |
| LOW | g4f/Provider/needs_auth/GeminiCLI.py | 87 | def get_gemini_cli_user_agent(model: str = "gemini-2.5-pro") -> str: |
| LOW | g4f/Provider/needs_auth/GeminiCLI.py | 567 | def _messages_to_gemini_format(messages: list, media: MediaListType) -> Dict[str, Any]: |
| LOW | g4f/Provider/needs_auth/MetaAI.py | 223 | def generate_offline_threading_id() -> str: |
| LOW | g4f/Provider/needs_auth/Antigravity.py | 69 | def get_antigravity_oauth_creds_path(): |
| LOW | g4f/Provider/needs_auth/Antigravity.py | 960 | def _messages_to_gemini_format(messages: list, media: MediaListType) -> List[Dict[str, Any]]: |
| LOW | g4f/Provider/needs_auth/DeepSeekAPI.py | 156 | def generate_client_stream_id() -> str: |
| LOW | g4f/Provider/openai/new.py | 53 | "unregisterProtocolHandler−function unregisterProtocolHandler() { [native code] }", |
| LOW | g4f/Provider/openai/new.py | 94 | "requestMediaKeySystemAccess−function requestMediaKeySystemAccess() { [native code] }", |
| LOW | g4f/mcp/apply_patch.py | 238 | def _parse_and_apply_unified_diff( |
| LOW | g4f/mcp/apply_patch.py | 308 | def apply_patch_with_fallback( |
| LOW | g4f/requests/__init__.py | 85 | def get_cookie_params_from_dict(cookies: Cookies, url: str = None, domain: str = None) -> list[CookieParam]: |
| LOW | g4f/requests/__init__.py | 185 | def set_browser_executable_path(browser_executable_path: str): |
| LOW | g4f/gui/server/api.py | 139 | def _prepare_conversation_kwargs(self, json_data: dict): |
| LOW | g4f/gui/server/api.py | 325 | def get_target_paths_and_urls(media: list[Union[str, tuple[str, str]]]) -> tuple[list[str], list[str]]: |
| LOW | g4f/api/__init__.py | 152 | def create_app_with_gui_and_debug(): |
| LOW | g4f/api/__init__.py | 157 | def create_app_with_demo_and_debug(): |
| LOW | g4f/api/__init__.py | 305 | def register_validation_exception_handler(self): |
| LOW | g4f/api/__init__.py | 307 | async def validation_exception_handler(request: Request, exc: RequestValidationError): |
| LOW | etc/unittest/config_provider.py | 78 | def test_initial_count_is_zero(self): |
| LOW | etc/unittest/config_provider.py | 81 | def test_increment_increases_count(self): |
| LOW | etc/unittest/config_provider.py | 198 | def test_quota_nested_yupp_false(self): |
| LOW | etc/unittest/config_provider.py | 204 | def test_quota_missing_key_resolves_zero(self): |
| LOW | etc/unittest/config_provider.py | 210 | def test_quota_missing_nested_key_resolves_zero(self): |
| LOW | etc/unittest/config_provider.py | 215 | def test_quota_combined_condition(self): |
| LOW | etc/unittest/config_provider.py | 241 | def test_get_quota_balance_alias(self): |
| LOW | etc/unittest/config_provider.py | 247 | def test_get_quota_balance_alias_false(self): |
| LOW | etc/unittest/config_provider.py | 254 | def test_empty_condition_returns_true(self): |
| LOW | etc/unittest/config_provider.py | 257 | def test_none_quota_treated_as_empty_dict(self): |
| LOW | etc/unittest/config_provider.py | 273 | def test_unknown_variable_raises(self): |
| LOW | etc/unittest/config_provider.py | 277 | def test_quota_unknown_sub_key_resolves_zero(self): |
| LOW | etc/unittest/config_provider.py | 128 | def test_error_count_lt_false(self): |
| LOW | etc/unittest/config_provider.py | 180 | def test_quota_balance_pollinations(self): |
| LOW | etc/unittest/config_provider.py | 186 | def test_quota_balance_pollinations_false(self): |
| LOW | etc/unittest/config_provider.py | 410 | async def test_condition_false_skips_provider(self): |
| LOW | etc/unittest/config_provider.py | 427 | async def test_condition_true_attempts_provider(self): |
| LOW | etc/unittest/config_provider.py | 354 | def test_get_unknown_model_returns_none(self): |
| LOW | etc/unittest/config_provider.py | 357 | def test_clear_removes_routes(self): |
| LOW | etc/unittest/config_provider.py | 362 | def test_provider_default_model_uses_route_name(self): |
| LOW | etc/unittest/config_provider.py | 396 | async def test_provider_not_found_skipped(self): |
| LOW | etc/unittest/test_minimax.py | 19 | def test_old_models_still_available(self): |
| LOW | etc/unittest/retry_provider.py | 25 | async def test_stream_skip_provider(self): |
| LOW | etc/unittest/retry_provider.py | 35 | async def test_stream_only_one_result(self): |
| LOW | etc/unittest/backend.py | 43 | def test_is_safe_url_with_backslash_confusion(self, mock_getaddrinfo): |
| LOW | etc/unittest/backend.py | 49 | def test_is_safe_url_blocks_private(self, mock_getaddrinfo): |
| LOW | etc/unittest/backend.py | 55 | def test_is_safe_url_allows_public(self, mock_getaddrinfo): |
| 57 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | g4f/Provider/Qwen.py | 273 | while not await page.evaluate('window.__baxia__ && window.__baxia__.getFYModule'): |
| HIGH | g4f/Provider/needs_auth/LMArena.py | 246 | while not await page.evaluate('window.grecaptcha && window.grecaptcha.enterprise'): |
| HIGH | g4f/Provider/needs_auth/LMArena.py | 270 | while not await page.evaluate('window.grecaptcha && window.grecaptcha.enterprise'): |
| HIGH | g4f/Provider/needs_auth/LMArena.py | 283 | resolve(null); |
| HIGH | g4f/Provider/needs_auth/Gemini.py | 65 | "gemini-2.5-pro-exp": {"x-goog-ext-525001261-jspb": '[1,null,null,null,"2525e3954d185b3c"]'}, |
| HIGH | g4f/Provider/needs_auth/Gemini.py | 66 | "gemini-2.5-flash": {"x-goog-ext-525001261-jspb": '[1,null,null,null,"35609594dbe934d8"]'}, |
| HIGH | g4f/Provider/needs_auth/Gemini.py | 67 | "gemini-2.0-flash-thinking-exp": {"x-goog-ext-525001261-jspb": '[1,null,null,null,"7ca48d02d802f20a"]'}, |
| HIGH | g4f/Provider/needs_auth/Gemini.py | 68 | "gemini-deep-research": {"x-goog-ext-525001261-jspb": '[1,null,null,null,"cd472a54d2abba7e"]'}, |
| HIGH | g4f/Provider/needs_auth/Gemini.py | 69 | "gemini-2.0-flash": {"x-goog-ext-525001261-jspb": '[null,null,null,null,"f299729663a2343f"]'}, |
| HIGH | g4f/Provider/needs_auth/Gemini.py | 70 | "gemini-2.0-flash-exp": {"x-goog-ext-525001261-jspb": '[null,null,null,null,"f299729663a2343f"]'}, |
| HIGH | g4f/Provider/needs_auth/Gemini.py | 71 | "gemini-2.0-flash-thinking": {"x-goog-ext-525001261-jspb": '[null,null,null,null,"9c17b1863f581b8a"]'}, |
| HIGH | g4f/Provider/needs_auth/Gemini.py | 72 | "gemini-2.0-flash-thinking-with-apps": {"x-goog-ext-525001261-jspb": '[null,null,null,null,"f8f8f5ea629f5d37"]'}, |
| HIGH | g4f/Provider/needs_auth/Gemini.py | 74 | "gemini-3-pro": {"x-goog-ext-525001261-jspb": '[1,null,null,null,"9d8ca3786ebdfbea",null,null,0,[4]]'}, |
| HIGH | g4f/Provider/needs_auth/Gemini.py | 75 | "gemini-2.5-pro": {"x-goog-ext-525001261-jspb": '[1,null,null,null,"61530e79959ab139",null,null,null,[4]]'}, |
| HIGH | g4f/Provider/needs_auth/Gemini.py | 76 | "gemini-2.5-flash": {"x-goog-ext-525001261-jspb": '[1,null,null,null,"9ec249fc9ad08861",null,null,null,[4]]'}, |
| HIGH | g4f/Provider/needs_auth/mini_max/crypt.py | 44 | M += hash_function("") # Mimics hashFunction(undefined) in JS |
| HIGH | g4f/Provider/needs_auth/mini_max/crypt.py | 61 | const os_name = navigator.userAgentData?.platform || navigator.platform || "Unknown"; |
| HIGH | g4f/Provider/needs_auth/mini_max/crypt.py | 70 | const cpu_core_num = navigator.hardwareConcurrency || 8; |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | g4f/integration/markitdown/__init__.py | 82 | # Check if the converter will accept the file, and if so, try to convert it |
| LOW | g4f/integration/markitdown/__init__.py | 155 | # Check if we have a seekable stream. If not, load the entire stream into memory. |
| LOW | g4f/integration/markitdown/_audio_converter.py | 104 | # Return the result |
| LOW | g4f/Provider/GLM.py | 149 | # Check if the file is less than 30 minutes old (30 * 60 seconds) |
| LOW | g4f/Provider/Perplexity.py | 197 | # Check if this is a followup request (has session tokens) |
| LOW | g4f/Provider/Yupp.py | 703 | # Check if this is a token-related error |
| LOW | g4f/Provider/hf_space/CohereForAI_C4AI_Command.py | 48 | # Check if the model exists directly in our models list |
| LOW | g4f/Provider/hf_space/CohereForAI_C4AI_Command.py | 52 | # Check if there's an alias for this model |
| LOW | g4f/Provider/github/copilotTokenProvider.py | 41 | # Check if we have a valid cached token |
| LOW | g4f/Provider/yupp/token_extractor.py | 97 | # Check if this is actually a cached token that failed |
| LOW | g4f/Provider/needs_auth/BlackboxPro.py | 1975 | # Check if there are valid session data in HAR files |
| LOW | g4f/Provider/needs_auth/BlackboxPro.py | 2005 | # Check if there are valid session data in HAR files |
| LOW | g4f/Provider/needs_auth/BlackboxPro.py | 2085 | # Check if this is a premium session |
| LOW | g4f/Provider/needs_auth/BlackboxPro.py | 2125 | # Check if this is a valid session object |
| LOW | g4f/Provider/needs_auth/BlackboxPro.py | 2270 | # Check if we have a valid session |
| LOW | g4f/Provider/needs_auth/Grok.py | 138 | # Check if it's a reasoning model |
| LOW | g4f/Provider/needs_auth/OpenaiChat.py | 285 | # Check if there is an image response |
| LOW | g4f/Provider/needs_auth/Gemini.py | 503 | # Check if the cache file was modified in the last minute to avoid 429 Too Many Requests |
| LOW | g4f/Provider/needs_auth/PuterJS.py | 241 | # Check if we need to use a vision model |
| LOW | g4f/Provider/needs_auth/DeepSeekAPI.py | 520 | # Check if response is actually SSE or regular JSON |
| LOW | g4f/mcp/apply_patch.py | 26 | # Check if patch is available in PATH |
| LOW | g4f/mcp/apply_patch.py | 201 | # Check if any changes |
| LOW | g4f/mcp/tools.py | 280 | # Check if image_data has url attribute |
| LOW | g4f/image/__init__.py | 218 | # Check if the data URI starts with 'data:image' and contains an image format (e.g., jpeg, png, gif) |
| LOW | g4f/image/__init__.py | 223 | # Check if the image format is one of the allowed formats (jpg, jpeg, png, gif) |
| LOW | etc/examples/vision_images.py | 37 | local_image.close() # Close file after use |
| LOW | etc/tool/commit.py | 149 | # Check if it's a git repository |
| LOW | etc/tool/commit.py | 152 | # Check if we're in a subdirectory of a git repo |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | g4f/providers/base_provider.py | 207 | Abstract method for creating asynchronous results. Args: model (str): The model to use for |
| HIGH | g4f/providers/base_provider.py | 253 | Abstract method for creating an asynchronous generator. Args: model (str): The model to us |
| HIGH | g4f/Provider/Chatai.py | 59 | Make an asynchronous request to the Chatai stream API. Args: model (str): The model name ( |
| HIGH | g4f/Provider/needs_auth/OpenaiChat.py | 388 | Create an asynchronous generator for the conversation. Args: model (str): The model name. |
| HIGH | g4f/Provider/needs_auth/bing/create_images.py | 65 | Creates images based on a given prompt using Bing's service. Args: session (ClientSession): Active cli |
| HIGH | g4f/mcp/pa_provider.py | 472 | Load a ``.pa.py`` file and return the provider class it defines. The file is executed inside the safe sandbox. The |
| HIGH | g4f/image/__init__.py | 256 | Detect file type from magic number / header signature. Args: binary_data (bytes): File binary data |
| HIGH | g4f/client/service.py | 31 | Retrieves the model and provider based on input parameters. Args: model (Union[Model, str]): The model |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | g4f/models.py | 1034 | # Create a list of all models and their providers |
| MEDIUM | g4f/integration/markitdown/__init__.py | 40 | # Create a copy of the page_converters list, sorted by priority. |
| MEDIUM | g4f/providers/any_provider.py | 322 | # Create a mapping of parent providers to their children |
| MEDIUM | …f/Provider/hf_space/BlackForestLabs_Flux1KontextDev.py | 76 | # Create a conversation/session data container holding tokens and session hash |
| MEDIUM | g4f/api/__init__.py | 512 | # Create the completion response |
| MEDIUM | g4f/client/__init__.py | 754 | # Create a new class that extends OpenaiTemplate |
| MEDIUM | etc/examples/mcp_tools_demo.py | 22 | # Create a tool call request for web search |
| MEDIUM | etc/examples/mcp_tools_demo.py | 64 | # Create a tool call request for web scraping |
| MEDIUM | etc/examples/mcp_tools_demo.py | 106 | # Create a tool call request for image generation |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | g4f/Provider/qwen/QwenCode.py | 0 | synchronous cli entry point for setup.py console_scripts. |
| HIGH | g4f/Provider/github/GithubCopilot.py | 0 | synchronous cli entry point for setup.py console_scripts. |
| HIGH | g4f/Provider/needs_auth/GeminiCLI.py | 0 | synchronous cli entry point for setup.py console_scripts. |
| HIGH | g4f/Provider/needs_auth/Antigravity.py | 0 | synchronous cli entry point for setup.py console_scripts. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | g4f/Provider/CopilotSession.py | 121 | # if not isinstance(media, str): |
| LOW | g4f/Provider/CopilotSession.py | 141 | # # Handle plain text content from bucket |
| LOW | g4f/Provider/Copilot.py | 161 | # if "/c/api/" in har_entry.get("request").get("url", ""): |
| LOW | g4f/Provider/Copilot.py | 201 | |
| LOW | g4f/Provider/needs_auth/LMArena.py | 221 | # button = await page.select('button[type="submit"]') |
| LOW | g4f/Provider/needs_auth/OpenaiChat.py | 261 | """ |
| LOW | g4f/Provider/needs_auth/Together.py | 101 | |
| LOW | g4f/Provider/needs_auth/hf/HuggingFaceAPI.py | 101 | api_path = f"{provider_key}/v1" |
| LOW | g4f/Provider/needs_auth/hf/__init__.py | 41 | if model in cls.model_aliases: |
| LOW | g4f/mcp/pa_provider.py | 81 | |
| LOW | g4f/mcp/pa_provider.py | 121 | # --------------------------------------------------------------------------- |
| LOW | g4f/api/_logging.py | 21 | # frame = frame.f_back |
| LOW | g4f/api/_tokenizer.py | 1 | # import tiktoken |
| LOW | etc/examples/config.yaml | 1 | # g4f config.yaml – Custom model routing configuration |
| LOW | etc/examples/config.yaml | 21 | # |
| LOW | .github/workflows/build-packages.yml | 301 | G4F_VERSION=${{ needs.prepare.outputs.version }} |
| LOW | .github/workflows/build-packages.yml | 321 | # pip3 install -r requirements-min.txt |
| LOW | .github/workflows/build-packages.yml | 481 | # url: https://pypi.org/p/g4f |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | g4f/client/__init__.py | 786 | api_key="your-api-key" |
| HIGH | etc/examples/aibadgr.py | 7 | export AIBADGR_API_KEY="your-api-key-here" |
| HIGH | etc/examples/aibadgr.py | 17 | api_key="your-api-key-here" # Or set AIBADGR_API_KEY environment variable |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | etc/unittest/mocks.py | 76 | |
| MEDIUM | etc/unittest/mocks.py | 86 | |
| MEDIUM | etc/unittest/mocks.py | 96 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | g4f/Provider/github/oauthFlow.py | 74 | interval += 5 # Increase interval as requested by GitHub |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | g4f/Provider/LambdaChat.py | 69 | # Step 1: Create a new conversation |
| LOW | g4f/Provider/LambdaChat.py | 80 | # Step 2: Get data for this conversation to extract message ID |
| LOW | g4f/Provider/LambdaChat.py | 130 | # Step 3: Send the user message |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | g4f/Provider/qwen/cookie_generator.py | 463 | # Example usage |
| LOW | etc/examples/messages.py | 29 | # Usage example |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | g4f/Provider/needs_auth/BlackboxPro.py | 297 | "description": "UI-TARS 72B is an open-source multimodal AI model designed specifically for automating browser and d |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | g4f/Provider/GLM.py | 159 | pass # If we can't delete the file, just return None |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | g4f/mcp/server.py | 104 | async def handle_request(self, request: MCPRequest) -> MCPResponse: |