Description
-what happened
gpt-4.1 model is not working in the below version
agent-framework-core 1.12.1
agent-framework-foundry 1.10.3
agent-framework-openai 1.11.0
It throws exception, attached below it is not generate desired outputs for simple question.
You can easily reproduce I have attached source code
Code Sample
client = FoundryChatClient(
project_endpoint="https://xxxx.cognitiveservices.azure.com/",
model="gpt-4.1",
credential=_StaticTokenCredential("xxxxx")
)
async with Agent(
client=client,
name="GitHubAgent",
instructions=(
"You are a helpful assistant that can help users interact with GitHub. "
"You can search for repositories, read file contents, check issues, and more. "
"Always be clear about what operations you're performing."
),
) as agent:
# Example 1: Get authenticated user information
query1 = "Capital of USA"
print(f"\nUser: {query1}")
result1 = await agent.run(query1)
print(f"Agent: {result1.text}")
Error Messages / Stack Traces
Exception has occurred: ChatClientException
("<class 'agent_framework_foundry._chat_client.FoundryChatClient'> service failed to complete the prompt: Error code: 400 - {'error': {'message': 'Encrypted content is not supported with this model.', 'type': 'invalid_request_error', 'param': 'include', 'code': None}}", BadRequestError("Error code: 400 - {'error': {'message': 'Encrypted content is not supported with this model.', 'type': 'invalid_request_error', 'param': 'include', 'code': None}}"))
httpx.HTTPStatusError: Client error '400 Bad Request' for url 'https://manulife-bot-foundry.cognitiveservices.azure.com/openai/v1/responses'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400
During handling of the above exception, another exception occurred:
openai.BadRequestError: Error code: 400 - {'error': {'message': 'Encrypted content is not supported with this model.', 'type': 'invalid_request_error', 'param': 'include', 'code': None}}
The above exception was the direct cause of the following exception:
File "C:\Workspace\Eviden\Polaris\atos-ai-agents\src\atos_ai_agents\test.py", line 108, in github_mcp_example
result1 = await agent.run(query1)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Workspace\Eviden\Polaris\atos-ai-agents\src\atos_ai_agents\test.py", line 112, in <module>
asyncio.run(github_mcp_example())
agent_framework.exceptions.ChatClientException: ("<class 'agent_framework_foundry._chat_client.FoundryChatClient'> service failed to complete the prompt: Error code: 400 - {'error': {'message': 'Encrypted content is not supported with this model.', 'type': 'invalid_request_error', 'param': 'include', 'code': None}}", BadRequestError("Error code: 400 - {'error': {'message': 'Encrypted content is not supported with this model.', 'type': 'invalid_request_error', 'param': 'include', 'code': None}}"))
Package Versions
agent-framework-core -1.12.1, agent-framework-foundry-1.10.3,agent-framework-openai- 1.11.0
Python Version
Python 3.12
Additional Context
No response
Description
-what happened
gpt-4.1 model is not working in the below version
agent-framework-core 1.12.1
agent-framework-foundry 1.10.3
agent-framework-openai 1.11.0
It throws exception, attached below it is not generate desired outputs for simple question.
You can easily reproduce I have attached source code
Code Sample
client = FoundryChatClient( project_endpoint="https://xxxx.cognitiveservices.azure.com/", model="gpt-4.1", credential=_StaticTokenCredential("xxxxx") ) async with Agent( client=client, name="GitHubAgent", instructions=( "You are a helpful assistant that can help users interact with GitHub. " "You can search for repositories, read file contents, check issues, and more. " "Always be clear about what operations you're performing." ), ) as agent: # Example 1: Get authenticated user information query1 = "Capital of USA" print(f"\nUser: {query1}") result1 = await agent.run(query1) print(f"Agent: {result1.text}")Error Messages / Stack Traces
Exception has occurred: ChatClientException ("<class 'agent_framework_foundry._chat_client.FoundryChatClient'> service failed to complete the prompt: Error code: 400 - {'error': {'message': 'Encrypted content is not supported with this model.', 'type': 'invalid_request_error', 'param': 'include', 'code': None}}", BadRequestError("Error code: 400 - {'error': {'message': 'Encrypted content is not supported with this model.', 'type': 'invalid_request_error', 'param': 'include', 'code': None}}")) httpx.HTTPStatusError: Client error '400 Bad Request' for url 'https://manulife-bot-foundry.cognitiveservices.azure.com/openai/v1/responses' For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400 During handling of the above exception, another exception occurred: openai.BadRequestError: Error code: 400 - {'error': {'message': 'Encrypted content is not supported with this model.', 'type': 'invalid_request_error', 'param': 'include', 'code': None}} The above exception was the direct cause of the following exception: File "C:\Workspace\Eviden\Polaris\atos-ai-agents\src\atos_ai_agents\test.py", line 108, in github_mcp_example result1 = await agent.run(query1) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Workspace\Eviden\Polaris\atos-ai-agents\src\atos_ai_agents\test.py", line 112, in <module> asyncio.run(github_mcp_example()) agent_framework.exceptions.ChatClientException: ("<class 'agent_framework_foundry._chat_client.FoundryChatClient'> service failed to complete the prompt: Error code: 400 - {'error': {'message': 'Encrypted content is not supported with this model.', 'type': 'invalid_request_error', 'param': 'include', 'code': None}}", BadRequestError("Error code: 400 - {'error': {'message': 'Encrypted content is not supported with this model.', 'type': 'invalid_request_error', 'param': 'include', 'code': None}}"))Package Versions
agent-framework-core -1.12.1, agent-framework-foundry-1.10.3,agent-framework-openai- 1.11.0
Python Version
Python 3.12
Additional Context
No response