Skip to content
This repository was archived by the owner on Mar 19, 2026. It is now read-only.
This repository was archived by the owner on Mar 19, 2026. It is now read-only.

dumps_kwargs keyword arguments are no longer supported. #314

@kingabzpro

Description

@kingabzpro

Description

My head hurts. I am just trying to run the getting started tutorial and first I was facing Jason handler error and now this:

─ Agent: Tweet Classifier ────────────────────────────────────────────────────────────────────────╮
│                                                                                                  │
│  ⠙ Tool call: "mark_task_1cbddcef_successful"                                                    │
│                                                                                                  │
│    Tool args: {'result': 0}                                                                      │
│  ⠙ Tool call: "mark_task_1cbddcef_successful"                                                    │
│                                                                                                  │
│    Tool args: {'result': 1}                                                                      │
│  ⠙ Tool call: "mark_task_1cbddcef_successful"                                                    │
│                                                                                                  │
│    Tool args: {'result': 1}                                                                      │
│  ⠙ Tool call: "mark_task_1cbddcef_successful"                                                    │
│                                                                                                  │
│    Tool args: {'result': 1}                                                                      │
│                                                                                                  │
╰──────────────────────────────────────────────────────────────────────────────────── 10:29:08 AM ─╯
10:29:08.785 | ERROR   | Task run 'Call LLM' - Task run failed with exception: TypeError('`dumps_kwargs` keyword arguments are no longer supported.') - Retries are exhausted
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/prefect/task_engine.py", line 752, in run_context
    yield self
  File "/usr/local/lib/python3.10/dist-packages/prefect/task_engine.py", line 1371, in run_generator_task_sync
    gen_result = next(gen)
  File "/usr/local/lib/python3.10/dist-packages/controlflow/agents/agent.py", line 308, in _run_model
    {response.json(indent=2)}
  File "/usr/local/lib/python3.10/dist-packages/pydantic/main.py", line 1143, in json
    raise TypeError('`dumps_kwargs` keyword arguments are no longer supported.')
TypeError: `dumps_kwargs` keyword arguments are no longer supported.
10:29:08.796 | ERROR   | Task run 'Call LLM' - Finished in state Failed('Task run encountered an exception TypeError: `dumps_kwargs` keyword arguments a

Example Code

import controlflow as cf

tweets = [
    "Negativity spreads too easily here. #sigh",
    "Sometimes venting is necessary. #HateTherapy",
    "Love fills the air today! 💖 #Blessed",
    "Thankful for all my Twitter friends! 🌟"
]

# Create a specialized agent 
classifier = cf.Agent(
    name="Tweet Classifier",
    model="openai/gpt-4o-mini",
    instructions="You are an expert at quickly classifying tweets.",
)
# Set up a ControlFlow task to classify tweets
classifications = cf.run(
    'Classify the tweets',
    result_type=['hate', 'love'],
    agents=[classifier],
    context=dict(tweets=tweets),
)

print(classifications)

Version Information

ControlFlow version: 0.9.3                              
       Prefect version: 3.0.2                              
LangChain Core version: 0.3.1                              
        Python version: 3.10.12                            
              Platform: Linux-6.1.85+-x86_64-with-glibc2.35
                  Path: /usr/local/lib/python3.10

Additional Context

I just want to write a simple tutorial for machine learning mastery and it is getting tough for me to even start.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions