Anthropic Agents (.NET) sample uses APIKey, but the actual property is ApiKey

Open Beginner friendly
#425 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Quiet
Tech stack
csharp
Domain
documentation

Research direction

Open the Anthropic provider documentation page and inspect the three C# code blocks under the public API and Foundry examples. Verify the AnthropicClient initializer against the referenced SDK documentation, then confirm all three samples use the exposed property name and no longer produce the reported CS0117 error.

Written by the indexing model from the issue text.

Description

The C# sample under "Basic Agent Creation (Anthropic Public API)" on this page shows:

AnthropicClient client = new() { APIKey = apiKey };

This doesn't compile — Microsoft.Agents.AI.Anthropic 1.13.0-preview.260703.1 (which depends on the official Anthropic SDK 12.20.0) exposes the property as ApiKey, not APIKey (confirmed against the official C# SDK docs, which consistently use ApiKey). Hit CS0117: 'AnthropicClient' does not contain a definition for 'APIKey' following this sample verbatim.

All three code blocks on the page using this pattern (public API, Foundry API key, Foundry Azure credentials) have the same typo.

Dominant language
Mermaid
Stars
263
Forks
167
Avg merge
3h 2m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

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.

More from MicrosoftDocs/semantic-kernel-docs

All issues in MicrosoftDocs/semantic-kernel-docs

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.