Skip to content

Support ForgeCode as an official client (currently rejected with "unauthorized client detected") #21

@chindris-mihai-alexandru

Description

Hi AgentRouter team,

I'd like to request official support for ForgeCode as a client.

Why this matters

ForgeCode is an open-source terminal coding agent with first-class multi-provider support:

AgentRouter already documents official integrations for:

  • Claude Code
  • Codex
  • Gemini CLI
  • RooCode
  • Kilocode
  • Qwen Code
  • Droid CLI

I would like to add ForgeCode to that list as well.

Current behavior

Direct/generic API access from ForgeCode-style requests is rejected with:

unauthorized client detected, contact support for assistance at https://discord.com/invite/V6kaP6Rg44

I reproduced this against:

  • GET https://agentrouter.org/v1/models
  • POST https://agentrouter.org/v1/chat/completions
  • POST https://agentrouter.org/v1/messages

Important detail

The same token does get past client authentication when used with the official Claude Code client configured as documented with:

  • ANTHROPIC_BASE_URL=https://agentrouter.org/
  • ANTHROPIC_AUTH_TOKEN=...
  • ANTHROPIC_API_KEY=...

With Claude Code, I get quota/model-entitlement errors instead of unauthorized client detected, which strongly suggests:

  • the token is valid
  • the current block is client-specific / allow-list based

What I have ready on the ForgeCode side

I already prepared a local ForgeCode patch that supports AgentRouter with a single token and official route families:

  • OpenAI-compatible route:
    • https://agentrouter.org/v1/chat/completions
  • Anthropic-compatible Claude route:
    • https://agentrouter.org/v1/messages
  • model listing:
    • https://agentrouter.org/v1/models

The local patch is tested on the ForgeCode side, but real usage is blocked by the current client rejection.

Request

Please either:

  1. officially support / whitelist ForgeCode as a client, or
  2. document the required headers / client requirements if ForgeCode support is intended

If support is enabled, I am happy to follow up with:

  • a ForgeCode upstream PR for first-class AgentRouter support
  • a docs PR to agentrouter-org/docs adding ForgeCode setup instructions

Related external report

Another project hit the same AgentRouter error:

Thanks.

Co-Authored-By: ForgeCode noreply@forgecode.dev

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions