microsoft-foundry / microsoft-foundry/foundry-samples

Issue "HttpResponseError: (None) Invalid tool value(s): azure_function. Use the Enterprise Standard offering to access these tool(s). Code: None Message: Invalid tool value(s): azure_function. Use the Enterprise Standard offering to access these tool(s)."

Open
#287 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Bicep
Stars
445
Forks
494
Avg merge
11h 35m
Merged PRs (30d)
38

Description

Hi, I'm getting this error while connecting an Azure Function (that triggers with Azure Storage Queues) as tool to an Azure AI Agent, something like this:

project_client = AIProjectClient(
    endpoint=os.getenv("PROJECT_ENDPOINT"),
    credential=DefaultAzureCredential(),
)

async with project_client:
    agents_client = project_client.agents

    storage_service_endpoint = os.getenv("STORAGE_SERVICE_ENDPOINT")
    azure_function_tool = AzureFunctionTool(
        name="SumTrigger",
        description="Makes a sum.",
        parameters={
            "type": "object",
            "properties": {
                "a": {"type": "number", "description": "The first number to add."},
                "b": {"type": "number", "description": "The second number to add."},
            },
        },
        input_queue=AzureFunctionStorageQueue(
            queue_name="azure-function-sum-input",
            storage_service_endpoint=storage_service_endpoint,
        ),
        output_queue=AzureFunctionStorageQueue(
            queue_name="azure-function-sum-output",
            storage_service_endpoint=storage_service_endpoint,
        ),
    )

    agent = await agents_client.create_agent(
        model=os.getenv("MODEL_DEPLOYMENT_NAME"),
        name="azure-function-agent-sum",
        instructions=f"You are a helpful support agent. Use the provided function any time the user wants to make a sum.",
        tools=azure_function_tool.definitions,
    )

I'm getting the error when creating the agent:
"HttpResponseError: (None) Invalid tool value(s): azure_function. Use the Enterprise Standard offering to access these tool(s). Code: None Message: Invalid tool value(s): azure_function. Use the Enterprise Standard offering to access these tool(s)."

Seems to be that the agent is not able to connect to the tool.

Does anyone have any ideas for this?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Python entry points shown: AzureFunctionTool and agents_client.create_agent(..., tools=azure_function_tool.definitions). Review the reported HttpResponseError alongside the Azure Function, Azure Storage Queue, and Azure AI Agent configuration described in the issue; done means identifying a reproducible resolution for creating the agent with these queues.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.