Skip to content

[Bug] list of issues upon trying. #3244

@DarkReaperBoy

Description

@DarkReaperBoy

Before submitting
☑️ I checked existing issues

Bug description
Clear steps to reproduce:

  1. Exact command/file used:
    browser_executable_path="/nix/store/g8y20w3b48c5h3yjgg4pm0v9ph95x8lj-chromium-142.0.7444.134/bin/chromium" g4f api

  2. Environment location: oman/cloudflare warp

  3. Observed behavior vs expected:
    will mention in the end.

Environment

  • Python version: Python 3.11.13
  • OS: NixOS 25.11 (Xantusia) x86_64
  • Relevant dependencies: pip install g4f[all]

Screenshots/Logs
Image

logs:

ERROR:g4f.gui.server.api:TypeError: can only concatenate str (not "NoneType") to str
Traceback (most recent call last):
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/gui/server/api.py", line 207, in _create_response_stream
    for chunk in result:
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/tools/run_tools.py", line 353, in iter_run_tools
    for chunk in provider.create_function(model=model, messages=messages, provider=provider, **kwargs):
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/providers/asyncio.py", line 56, in to_sync_generator
    yield loop.run_until_complete(await_callback(gen.__anext__, timeout))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/providers/asyncio.py", line 38, in await_callback
    return await asyncio.wait_for(callback(), timeout) if timeout is not None else await callback()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/asyncio/tasks.py", line 489, in wait_for
    return fut.result()
           ^^^^^^^^^^^^
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/Provider/needs_auth/Azure.py", line 138, in create_async_generator
    async for chunk in super().create_async_generator(
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/Provider/template/OpenaiTemplate.py", line 152, in create_async_generator
    async for chunk in read_response(response, stream, prompt, cls.get_dict(), download_media):
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/Provider/template/OpenaiTemplate.py", line 209, in read_response
    OpenaiTemplate.raise_error(data)
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/providers/base_provider.py", line 432, in raise_error
    raise ResponseError(data["error"]["message"])
g4f.errors.ResponseError: TypeError: can only concatenate str (not "NoneType") to str
Image

logs:

ERROR:g4f.gui.server.api:401, message='Unauthorized', url='https://chatai.aritek.app/stream'
Traceback (most recent call last):
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/gui/server/api.py", line 207, in _create_response_stream
    for chunk in result:
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/tools/run_tools.py", line 353, in iter_run_tools
    for chunk in provider.create_function(model=model, messages=messages, provider=provider, **kwargs):
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/providers/asyncio.py", line 56, in to_sync_generator
    yield loop.run_until_complete(await_callback(gen.__anext__, timeout))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/providers/asyncio.py", line 38, in await_callback
    return await asyncio.wait_for(callback(), timeout) if timeout is not None else await callback()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/asyncio/tasks.py", line 489, in wait_for
    return fut.result()
           ^^^^^^^^^^^^
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/Provider/Chatai.py", line 139, in create_async_generator
    raise e
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/Provider/Chatai.py", line 102, in create_async_generator
    response.raise_for_status() # Check for HTTP errors (4xx, 5xx)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 629, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 401, message='Unauthorized', url='https://chatai.aritek.app/stream'
Image

waits forever, with and without cloudflare warp.

Image

logs:

ERROR:g4f.gui.server.api:Response 400: {'detail': '403: Signature validation failed: 签名验证失败'}
Traceback (most recent call last):
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/gui/server/api.py", line 207, in _create_response_stream
    for chunk in result:
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/tools/run_tools.py", line 353, in iter_run_tools
    for chunk in provider.create_function(model=model, messages=messages, provider=provider, **kwargs):
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/providers/asyncio.py", line 56, in to_sync_generator
    yield loop.run_until_complete(await_callback(gen.__anext__, timeout))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/providers/asyncio.py", line 38, in await_callback
    return await asyncio.wait_for(callback(), timeout) if timeout is not None else await callback()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/asyncio/tasks.py", line 489, in wait_for
    return fut.result()
           ^^^^^^^^^^^^
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/Provider/GLM.py", line 238, in create_async_generator
    await raise_for_status(response)
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/requests/raise_for_status.py", line 58, in raise_for_status_async
    raise ResponseStatusError(f"Response {response.status}: {'HTML content' if is_html else message}")
g4f.errors.ResponseStatusError: Response 400: {'detail': '403: Signature validation failed: 签名验证失败'}
Image

logs:

ERROR:g4f.gui.server.api:'coroutine' object has no attribute '__aiter__'
Traceback (most recent call last):
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/gui/server/api.py", line 207, in _create_response_stream
    for chunk in result:
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/tools/run_tools.py", line 353, in iter_run_tools
    for chunk in provider.create_function(model=model, messages=messages, provider=provider, **kwargs):
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/providers/asyncio.py", line 53, in to_sync_generator
    gen = generator.__aiter__()
          ^^^^^^^^^^^^^^^^^^^
AttributeError: 'coroutine' object has no attribute '__aiter__'
Image

it does nothing.

Image

logs:

ERROR:g4f.gui.server.api:200, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url='https://lambda.ai/'
Traceback (most recent call last):
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/gui/server/api.py", line 207, in _create_response_stream
    for chunk in result:
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/tools/run_tools.py", line 353, in iter_run_tools
    for chunk in provider.create_function(model=model, messages=messages, provider=provider, **kwargs):
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/providers/asyncio.py", line 56, in to_sync_generator
    yield loop.run_until_complete(await_callback(gen.__anext__, timeout))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/providers/asyncio.py", line 38, in await_callback
    return await asyncio.wait_for(callback(), timeout) if timeout is not None else await callback()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/asyncio/tasks.py", line 489, in wait_for
    return fut.result()
           ^^^^^^^^^^^^
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/Provider/LambdaChat.py", line 74, in create_async_generator
    conversation_response = await response.json()
                            ^^^^^^^^^^^^^^^^^^^^^
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 749, in json
    raise ContentTypeError(
aiohttp.client_exceptions.ContentTypeError: 200, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url='https://lambda.ai/'

Image

logs:

ERROR:g4f.gui.server.api:Response 500: Fetch response failed
Traceback (most recent call last):
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/gui/server/api.py", line 207, in _create_response_stream
    for chunk in result:
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/tools/run_tools.py", line 353, in iter_run_tools
    for chunk in provider.create_function(model=model, messages=messages, provider=provider, **kwargs):
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/providers/asyncio.py", line 56, in to_sync_generator
    yield loop.run_until_complete(await_callback(gen.__anext__, timeout))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/providers/asyncio.py", line 38, in await_callback
    return await asyncio.wait_for(callback(), timeout) if timeout is not None else await callback()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/asyncio/tasks.py", line 489, in wait_for
    return fut.result()
           ^^^^^^^^^^^^
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/Provider/needs_auth/MetaAI.py", line 47, in create_async_generator
    async for chunk in cls(proxy).prompt(format_prompt(messages)):
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/Provider/needs_auth/MetaAI.py", line 120, in prompt
    await raise_for_status(response, "Fetch response failed")
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/requests/raise_for_status.py", line 58, in raise_for_status_async
    raise ResponseStatusError(f"Response {response.status}: {'HTML content' if is_html else message}")
g4f.errors.ResponseStatusError: Response 500: Fetch response failed

both lmarena and copilot worked, but the browser clicks wrong place in captcha.

copilot with glass logo is dead.

Image

microsoft designer is dead
Image

already mentioned in #3240
Image

this provider returns wrong model:
Image

OI VSCode Server 2 is dead.
Image

OpenAI ChatGpt:
Image

perplexity returning the same model (turbo) regardless of what i choose (like claude45sonnet).

pi provider:

Image

logs:

ERROR:g4f.gui.server.api:Pi.create_async_generator() missing 1 required positional argument: 'stream'
Traceback (most recent call last):
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/gui/server/api.py", line 207, in _create_response_stream
    for chunk in result:
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/tools/run_tools.py", line 353, in iter_run_tools
    for chunk in provider.create_function(model=model, messages=messages, provider=provider, **kwargs):
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/providers/base_provider.py", line 139, in create_function
    return cls.create_completion(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/run/media/nako/Games/.bin/mamba/envs/general/lib/python3.11/site-packages/g4f/providers/base_provider.py", line 313, in create_completion
    cls.create_async_generator(model, messages, **kwargs),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Pi.create_async_generator() missing 1 required positional argument: 'stream'

yupp sends two messages (i know it is intended, but i can't like or dislike or specify reason so what is the point of having two responses?)

Additional context
none. thank you. ❤️

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingstale

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions