Skip to content

bug(claude): validate_connection fails on Azure AI Foundry -- models.list() not supported #455

Description

@nskun

Summary:

ClaudeProvider.validate_connection() unconditionally calls client.models.list() to verify connectivity.
Azure AI Foundry's Anthropic endpoint does not support this API, causing validate_connection() to always return False.
This blocks workflow execution at startup.

Environment

Conductor v0.1.31
Anthropic Python SDK(latest)
Endpoint: Azure AI Foundry(https://.services.ai.azure.com/anthropic)
Authentication: API key via ANTHROPIC_API_KEY

Steps to Reproduce

  1. Configure Conductor to use Azure AI Foundry's Anthropic endpoint:
export ANTHROPIC_BASE_URL=https://<resource>.services.ai.azure.com/anthropic
export ANTHROPIC_API_KEY=<key>

2.Run any workflow:

conductor run workflow.yaml

3.Observe: startup fails with connection validation error.

Root Cause

In claude.py L379, validate_connection() calls

async def validate_connection(self) -> bool:
    # ...
    try:
        await self._client.models.list() # <- fails on Azure AI Foundry
        await self._log_available_models()
        return True
    except Exception as e:
        logger.error(f"Connection validation failed: {e}")
        return False # <- always reached

Azure AI Foundry's Anthropic endpoint does not implement the /v1/models API.
The models.list() call raises an exception(404 or similar), and validate_connection() returns False.

The actual inference endpoint(/v1/messages) works fine -- only the model listing is unsupported.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions