Skip to content

Add Claude Code integration guide for Inference Providers#2387

Merged
Wauplin merged 7 commits intomainfrom
cursor/claude-code-integration-45ca
Apr 20, 2026
Merged

Add Claude Code integration guide for Inference Providers#2387
Wauplin merged 7 commits intomainfrom
cursor/claude-code-integration-45ca

Conversation

@Wauplin
Copy link
Copy Markdown
Contributor

@Wauplin Wauplin commented Apr 15, 2026

This PR adds a new integration guide documenting how to use Claude Code with Hugging Face Inference Providers.

Changes

New file: docs/inference-providers/integrations/claude-code.md

A dedicated integration page covering two setup methods:

  1. hf-claude extension (recommended) — an extension for the hf CLI (hanouticelina/hf-claude) that provides an interactive model and provider picker, then launches Claude Code with the correct environment variables.
  2. Manual environment variables — setting ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_API_KEY, and ANTHROPIC_DEFAULT_*_MODEL to route Claude Code through router.huggingface.co.

Also covers prerequisites, billing to an organization, and links to resources.

Updated: docs/inference-providers/integrations/index.md

  • Added Claude Code to the integrations overview table
  • Added Claude Code to the Developer Tools category list

Updated: docs/inference-providers/_toctree.yml

  • Added Claude Code to the sidebar navigation under Integrations

Slack Thread

Open in Web Open in Cursor 

- Add dedicated integration page (claude-code.md) documenting:
  - hf-claude extension (recommended) for interactive model/provider selection
  - Manual environment variable configuration
  - Billing to an organization
- Add Claude Code to the integrations overview table and Developer Tools category
- Add Claude Code to the sidebar navigation (_toctree.yml)

Co-authored-by: Lucain <Wauplin@users.noreply.github.com>
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

cursoragent and others added 2 commits April 15, 2026 08:14
- Feature Gemma 4 instead of DeepSeek R1 in intro
- Link to huggingface.co/inference/models instead of models search page
- Use MiniMaxAI/MiniMax-M2.7:fireworks-ai as provider suffix example
- Expand TIP to show different models per slot (GLM 5.1 for Opus,
  gemma-4-31B-it:together for Sonnet, gpt-oss-120b:cerebras for Haiku)
- Remove Billing to an Organization section

Co-authored-by: Lucain <Wauplin@users.noreply.github.com>
Co-authored-by: Lucain <Wauplin@users.noreply.github.com>
Comment thread docs/inference-providers/integrations/claude-code.md Outdated
Comment thread docs/inference-providers/integrations/claude-code.md Outdated
@Wauplin Wauplin marked this pull request as ready for review April 15, 2026 08:23
Comment thread docs/inference-providers/integrations/claude-code.md
Copy link
Copy Markdown
Member

@davanstrien davanstrien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice! Will give this a try myself!

Comment thread docs/inference-providers/integrations/claude-code.md
Co-authored-by: Daniel van Strien <davanstrien@users.noreply.github.com>
Copy link
Copy Markdown
Member

@Pierrci Pierrci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Copy link
Copy Markdown
Member

@pcuenca pcuenca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool!

Comment thread docs/inference-providers/integrations/claude-code.md Outdated
You can also append a `:cheapest` or `:fastest` suffix to prefer cheaper or faster providers (e.g. `MiniMaxAI/MiniMax-M2.7:cheapest`).

> [!TIP]
> The `ANTHROPIC_DEFAULT_*_MODEL` variables map to Claude Code's internal model slots (Opus, Sonnet, Haiku), from the most powerful to the quickest. You can assign different models to each slot to balance capability and speed e.g. `zai-org/GLM-5.1` for Opus, `google/gemma-4-31B-it:together` for Sonnet, and `openai/gpt-oss-120b:cerebras` for Haiku. `CLAUDE_CODE_SUBAGENT_MODEL` controls which model is used for sub-agents.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this available through the extension picker or just by setting the envvars? (just curious)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only when setting env vars manually (could be added to hf-claude I suppose cc @hanouticelina - low prio though)

Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
@Wauplin Wauplin merged commit 8ec5d41 into main Apr 20, 2026
3 checks passed
@Wauplin Wauplin deleted the cursor/claude-code-integration-45ca branch April 20, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants