Skip to content

from agents.extensions.models.litellm_model import LitellmModel #666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
LuSrodri opened this issue May 8, 2025 · 2 comments
Open

from agents.extensions.models.litellm_model import LitellmModel #666

LuSrodri opened this issue May 8, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@LuSrodri
Copy link

LuSrodri commented May 8, 2025

When called: from agents.extensions.models.litellm_model import LitellmModel

Appers this error mensage:

Traceback (most recent call last):
  File "C:\Users\boomg\Documents\workspace\ws-python\sales-agent\example_1.py", line 5, in <module>
    from agent import sales_agent_factory, CompanysContext
  File "C:\Users\boomg\Documents\workspace\ws-python\sales-agent\agent.py", line 6, in <module>
    from agents.extensions.models.litellm_model import LitellmModel
  File "C:\Users\boomg\Documents\workspace\ws-python\sales-agent\env\lib\site-packages\agents\extensions\models\litellm_model.py", line 8, in <module>
    import litellm.types
  File "C:\Users\boomg\Documents\workspace\ws-python\sales-agent\env\lib\site-packages\litellm\__init__.py", line 763, in <module>
    from .cost_calculator import completion_cost
  File "C:\Users\boomg\Documents\workspace\ws-python\sales-agent\env\lib\site-packages\litellm\cost_calculator.py", line 19, in <module>
    from litellm.litellm_core_utils.llm_cost_calc.utils import (
  File "C:\Users\boomg\Documents\workspace\ws-python\sales-agent\env\lib\site-packages\litellm\litellm_core_utils\llm_cost_calc\utils.py", line 9, in <module>
    from litellm.utils import get_model_info
  File "C:\Users\boomg\Documents\workspace\ws-python\sales-agent\env\lib\site-packages\litellm\utils.py", line 188, in <module>
    json_data = json.load(f)
  File "C:\Users\boomg\AppData\Local\Programs\Python\Python310\lib\json\__init__.py", line 293, in load
    return loads(fp.read(),
  File "C:\Users\boomg\AppData\Local\Programs\Python\Python310\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 1980: character maps to <undefined>

Dependencies:

openai-agent==0.0.14
openai-agents[litellm]==0.0.14

Python version: 3.10.7

@LuSrodri LuSrodri added the bug Something isn't working label May 8, 2025
@clho40
Copy link

clho40 commented May 9, 2025

I get the same problem, this is a Windows-specific issue. The LiteLLM team fixed it here BerriAI/litellm#10542. Can we update to the latest version?

@dibenedetto
Copy link

I get the same problem, this is a Windows-specific issue. The LiteLLM team fixed it here BerriAI/litellm#10542. Can we update to the latest version?

hi, is there some news on the integration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants