Skip to content

Python: service_thread_id missing in case of Anthropic #3198

@sakhan-rio

Description

@sakhan-rio

I created an agent using AnthropicClient class with anthropic client as AsyncAnthropicFoundry client and for thread creation I am using get_new_thread().

In case of Anthropic Foundry Agent, after first the thread object does not get assigned any thread_service_id and I see chat message store populated while in case of AzureAIAgentClient agent, after first run the thread_service_id gets assigned to the thread.

For resuming the conversation from the same thread, thread_service_id plays an important role and helps easily persist the conversation in external db.

Can you please suggest how can we resume thread in case of Anthropic Agents as no service_thread_id exist?

Attaching sample snippets for reference:

Agent using AzureAIAgentClient and thread.
Image

Agent using AnthropicClient and thread:

Image

Metadata

Metadata

Labels

model clientsIssues related to the model client implementationspythonv1.0Features being tracked for the version 1.0 GA

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions