Azure-Samples / Azure-Samples/openai

Azure OpenAI not working with Agents - Unknown parameter: 'tools[0].function.strict

Open
#127 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
1.3k
Forks
455
Avg merge
16h 17m
Merged PRs (30d)
1

Description

This is issue due to azure open ai can someone try to solve it
Here's my code:

client = AzureOpenAI(
api_key=settings.OPENAI_KEY,
api_version=settings.OPENAI_VERSION,
azure_endpoint=settings.OPENAI_ENDPOINT,
timeout=5,
max_retries=5,
)

set_openai_client(client)

ceo = Agent(
name="CEO",
description="Responsible for client communication, task planning and management.",
instructions="You must converse with other agents to ensure complete task execution.", # can be a file like ./instructions.md
files_folder="./files", # files to be uploaded to OpenAI
schemas_folder="./schemas", # OpenAPI schemas to be converted into tools
temperature=0.5, # temperature for the agent
max_prompt_tokens=25000, # max tokens in conversation history
model=settings.OPENAI_MODEL_GPT_4o
)

dev = Dev(id=model=settings.OPENAI_MODEL_GPT_4o)

agency = Agency(
[ceo,
[ceo, dev]
]
)

agency.run_demo()

Error code: 400 - {'error': {'message': "Unknown parameter: 'tools[0].function.strict'.", 'type': 'invalid_request_error', 'param': 'tools[0].function.strict', 'code': 'unknown_parameter'}}

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the shown AzureOpenAI and Agent setup with the reported model and API version, then trace the generated tools payload that contains tools[0].function.strict. Done means the agent request is accepted by Azure OpenAI without the unknown-parameter error; the payload names no repository files or tests to begin with.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
ai, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.