Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

aidial-adapter-anthropic

Latest version: v0.23.0.dev1

Overview

Last scanned
1 Dec 2026
Published
1 Dec 2026
PyPI package Publisher: epam
0 Stars
0 Forks
22 Versions
6.2K Downloads
Python Repo language

Scan summary

aidial-adapter-anthropic was last scanned on 1 Dec 2026 at version 0.23.0.dev1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 22 versions; the latest 4 were published within 7 days (25 Nov – 1 Dec 2026).
  • Findings: No rules fired in version 0.23.0.dev1.
  • Downloads: 6,156 downloads.

Versions

22 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.23.0.dev1 LATEST 1 Dec 2026 No rules fired
0.22.0 27 Nov 2026 No rules fired
0.22.0.dev2 27 Nov 2026 No rules fired
0.22.0.dev1 25 Nov 2026 Not shown
0.21.0 6 Nov 2026 Not shown

No rules fired in 0.23.0.dev1

Findings

Findings for v0.23.0.dev1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.23.0.dev1; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

  • Overview
  • Chat Completions API
    • Basic request
      • Structured outputs
      • Maximum completion tokens
      • Function calling
      • Multi-modal inputs
        • File URL
      • Reasoning effort
    • DIAL extensions
      • Attachments
      • Configuration
        • Extended thinking
        • Reasoning level
      • Web search
      • Prompt truncation
      • Prompt caching
        • Automatic caching
        • Explicit cache breakpoints
        • TTL support
        • DIAL Core configuration
  • Anthropic API
    • Usage
    • Proxied endpoints
    • Cache breakpoints
    • Supported backends
  • Development Environment
    • Setup
    • Lint
    • Test
    • Clean
    • Build
    • Publish
    • Git hooks

Overview

The package exposes Claude models via two APIs:

API Description
Chat Completions API The AI DIAL Chat Completion API adapted to the Anthropic Messages API
Anthropic API The native Anthropic Messages API served in the passthrough mode

Chat Completions API

The package provides an adapter from the Chat Completions API (ingress) to the Anthropic Messages API (upstream).

Basic request

The standard Chat Completions request fields are supported as follows:

Field Support
messages Supported, including the system, developer, tool and function messages. See Multi-modal inputs for the non-text content
stream, stop, top_p Relayed to the Anthropic API as-is
temperature Mapped from the OpenAI [0, 2] range to the Anthropic [0, 1] range
n Supported via parallel requests to the upstream
max_tokens See Maximum completion tokens
response_format See Structured outputs
tools, tool_choice See Function calling
reasoning_effort See Reasoning effort
seed Unsupported by Claude, ignored

The token usage is reported in the usage object, including completion_tokens_details.reasoning_tokens and the cache counters (see Prompt caching).

Structured outputs

response_format of type json_schema is supported via the Anthropic structured outputs. Claude accepts no other value of additionalProperties but false, so the adapter sets it throughout the schema.

The json_object type is unsupported and ignored.

Maximum completion tokens

Unlike OpenAI models, Claude models require the max_tokens parameter. When the request omits it, the adapter falls back to the default configured by the host application.

We recommend configuring the default on a per-model basis in the DIAL Core config instead, since all the token-related information (like pricing and token limits) is then kept in the same place. The DIAL Core default takes precedence over the adapter one.

{
  "models": {
    "${DIAL_DEPLOYMENT_ID}": {
      "type": "chat",
      "endpoint": "...",
      "defaults": {
        "max_tokens": 2048
      }
    }
  }
}

Make sure the default doesn't exceed the max output tokens of the model, otherwise the request fails with an error like max_tokens: 10000 > 8192, which is the maximum allowed number of output tokens for claude-....

Function calling

The tools and tool_choice fields are supported, tool_choice including the auto, none, required and named-function modes.

The legacy Functions API (functions and function_call) is supported as well and converted to tools transparently. Claude may generate more than one call per response, while the Functions API allows a single one; the extra calls are discarded in this mode.

Multi-modal inputs
Content part type Support
text Supported
image_url The image_url.url field is a file URL
file The file.file_data field is either a data URL or a base64-encoded PDF. The file_id field is unsupported
input_audio, refusal Unsupported
{
  "messages": [
    {
      "role": "user",
      "content": [
        {"type": "text", "text": "Describe the image"},
        {
          "type": "image_url",
          "image_url": {"url": "$file_url"}
        }
      ]
    }
  ]
}
{
  "messages": [
    {
      "role": "user",
      "content": [
        {"type": "text", "text": "Summarize the document"},
        {
          "type": "file",
          "file": {
            "filename": "report.pdf",
            "file_data": "data:application/pdf;base64,JVBERi0xLjQK..."
          }
        }
      ]
    }
  ]
}

Files of any supported type may also be passed as DIAL attachments.

File URL

The $file_url referenced in the examples is one of the three:

Mode Example
Relative DIAL URL files/${DIAL_BUCKET}/images/cat.png
Public URL https://example.com/images/cat.png
Data URL data:image/png;base64,iVBORw0KGgo...

The relative URLs are resolved against the DIAL file storage and downloaded with the caller's API key, which requires the host application to be configured with the storage. Any other URL is downloaded as-is, without the credentials.

Reasoning effort

The reasoning_effort field sets the effort level of the response: low, medium, high, xhigh or max. The none and minimal values have no Claude counterpart and are rejected by the Anthropic API.

DIAL extensions

The features below are the DIAL extensions of the Chat Completions API.

Attachments

The attachments are passed in the custom_content.attachments field of a message. An attachment either points to the file via url — a file URL — or carries it inline in the base64-encoded data field. The type field may be omitted as long as the MIME type is derivable from the URL. The supported types are:

Type MIME types
Images image/png, image/jpeg, image/gif, image/webp
PDF documents application/pdf
Text documents text/plain, text/html, text/css, text/javascript, text/x-typescript, text/csv, text/markdown, text/x-python, text/xml, text/rtf, application/json

The documents are supported only by the models with PDF support.

{
  "messages": [
    {
      "role": "user",
      "content": "Is there any difference between these images?",
      "custom_content": {
        "attachments": [
          {
            "type": "image/png",
            "url": "$file_url"
          },
          {
            "type": "image/png",
            "data": "iVBORw0KGgo..."
          }
        ]
      }
    }
  ]
}
{
  "messages": [
    {
      "role": "user",
      "content": "Summarize the documents",
      "custom_content": {
        "attachments": [
          {
            "type": "application/pdf",
            "url": "$file_url"
          },
          {
            "type": "application/pdf",
            "data": "JVBERi0xLjQK..."
          }
        ]
      }
    }
  ]
}

Setting enable_citations in the configuration makes Claude cite the documents it used; the citations are returned as numbered DIAL attachments.

Configuration

The adapter accepts a per-request configuration object in the custom_fields.configuration field. All its fields are optional; the host application serves its JSON Schema via the DIAL /configuration endpoint.

Field Description
thinking Extended thinking configuration
effort Reasoning level of the response
betas List of beta feature flags to enable, e.g. ["token-efficient-tools-2025-02-19"]
enable_citations Enables citations for the document attachments. Defaults to false

Not every Claude deployment supports every field or beta flag; consult the official documentation before use.

{
  "messages": [
    {"role": "user", "content": "Hello!"}
  ],
  "custom_fields": {
    "configuration": {
      "thinking": {"type": "adaptive"},
      "effort": "high",
      "betas": ["token-efficient-tools-2025-02-19"],
      "enable_citations": true
    }
  }
}
Extended thinking

The thinking object is relayed to the Anthropic API as-is, so any thinking configuration is supported:

Configuration Comment
{"type": "adaptive"} The model decides when to think
{"type": "enabled", "budget_tokens": 1024} Thinking with the given limit on reasoning tokens
{"type": "disabled"} Thinking disabled

The thinking blocks are reported in a dedicated Thinking stage and preserved across conversation turns, so multi-turn tool use works with thinking enabled.

temperature is ignored when thinking is enabled; top_p is ignored as well when thinking is adaptive, since Claude rejects both parameters in these modes.

Reasoning level

The effort field is an alternative to the reasoning effort and accepts the same Claude levels. The value is relayed to the Anthropic API as-is, so the levels added later work without an adapter update.

Setting both effort and reasoning_effort to different values is a validation error.

Web search

Web search gives Claude direct access to real-time web content, allowing it to answer questions with up-to-date information beyond its knowledge cutoff. It is an Anthropic server-side tool: the searches are executed on Anthropic's side, and the final response includes citations for the sources used. See Web search tool in the Anthropic docs.

To enable web search, add a static tool named web_search to the request's tools list. The Anthropic web search tool definition goes into static_function.configuration; the name is defaulted from the static function, so you don't have to repeat it. Being a server-side tool, web search never forces a tool_choice and can be combined with ordinary function tools.

{
  "model": "claude-opus-4-8",
  "messages": [
    {"role": "user", "content": "What is the weather in NYC?"}
  ],
  "tools": [
    {
      "type": "static_function",
      "static_function": {
        "name": "web_search",
        "configuration": {
          "type": "web_search_20250305"
        }
      }
    }
  ]
}

The tool definition supports optional fields such as max_uses, allowed_domains, blocked_domains, and user_location. See Tool definition in the Anthropic docs.

{
  "model": "claude-opus-4-8",
  "messages": [
    {"role": "user", "content": "What is the weather in San Francisco?"}
  ],
  "tools": [
    {
      "type": "static_function",
      "static_function": {
        "name": "web_search",
        "configuration": {
          "type": "web_search_20250305",
          "max_uses": 5,
          "allowed_domains": ["example.com", "trusteddomain.org"],
          "user_location": {
            "type": "approximate",
            "city": "San Francisco",
            "region": "California",
            "country": "US",
            "timezone": "America/Los_Angeles"
          }
        }
      }
    }
  ]
}
Prompt truncation

When max_prompt_tokens is set, the adapter discards the oldest messages until the prompt fits the limit, keeping the system prompt and the last message. The indices of the discarded messages are reported in the statistics.discarded_messages field of the response.

{
  "max_prompt_tokens": 1024,
  "messages": [
    {"role": "system", "content": "You are a helpful assistant."},
    {
      "role": "user",
      "content": "Summarize the transcript: ${A_TRANSCRIPT_OVER_1024_TOKENS}"
    },
    {
      "role": "assistant",
      "content": "The speakers agree to revisit the Q3 plan in October, ..."
    },
    {"role": "user", "content": "What is the capital of France?"}
  ]
}

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases aidial-adapter-anthropic

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Frame 2085668439 (1)
Group 1261154229