openclaw - 💡(How to fix) Fix [Feature]: feat(auth): Add support for providers without API key (no-auth marker) [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#63445Fetched 2026-04-09 07:53:37
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
labeled ×1

Error Message

Current error without the fix:

Error: No API key found for provider "kilo-ai"

Fix Action

Solution

Add support for providers that don't require authentication by using a special no-auth marker.

RAW_BUFFERClick to expand / collapse

Summary

Problem

OpenClaw requires API key for all providers, even for free providers that don't need authentication (like kilo.ai free models).

Problem to solve

Problem

OpenClaw requires API key for all providers, even for free providers that don't need authentication (like kilo.ai free models).

Proposed solution

Solution

Add support for providers that don't require authentication by using a special no-auth marker.

Changes

  1. model-auth-markers.ts: Add NO_AUTH_MARKER = "no-auth" constant
  2. model-auth.ts:
    • Detect no-auth marker in resolveSyntheticLocalProviderAuth
    • Return true in hasAvailableAuthForProvider when synthetic auth exists
    • Remove Authorization header in applyLocalNoAuthHeaderOverride for no-auth

Usage

{
  "models": {
    "providers": {
      "kilo-ai": {
        "api": "openai-completions",
        "baseUrl": "https://api.kilo.ai/api/openrouter/v1",
        "apiKey": "no-auth",
        "models": [{"id": "kilo-auto/free", "name": "Kilo Auto Free"}]
      }
    }
  }
}
This enables using free AI providers that don't require API keys.
**Archivos a modificar:**
- `src/agents/model-auth-markers.ts`
- `src/agents/model-auth.ts`

### Alternatives considered


- Setting a fake API key - doesn't work, the system detects it
- Using local provider (localhost) - doesn't apply for remote APIs like kilo.ai
- Modifying the provider plugin - wouldn't fix the core auth problem

### Impact

- Affected: Users using free providers without API key (e.g., kilo.ai free, others)
- Severity: Blocks workflow - can't use free models
- Frequency: Always for these providers
- Consequences: Can't use free AI, have to pay for API keys

### Evidence/examples

# Current error without the fix:
Error: No API key found for provider "kilo-ai"
# With the fix (apiKey: "no-auth"):
Works correctly with kilo-auto/free

### Additional information

- Backward compatible with existing config keys
- Doesn't affect providers using real API keys
- The "no-auth" marker is only for providers that don't require aut

extent analysis

TL;DR

To fix the issue, add a "no-auth" marker to the configuration for free providers that don't require authentication, such as kilo.ai free models.

Guidance

  • Modify the model-auth-markers.ts file to include a NO_AUTH_MARKER constant with the value "no-auth".
  • Update the model-auth.ts file to detect the "no-auth" marker and handle authentication accordingly.
  • Use the "no-auth" marker in the provider configuration, as shown in the example JSON snippet, to enable the use of free AI providers without API keys.
  • Verify the fix by checking that the error "No API key found for provider" is resolved and that the free models can be used correctly.

Example

{
  "models": {
    "providers": {
      "kilo-ai": {
        "api": "openai-completions",
        "baseUrl": "https://api.kilo.ai/api/openrouter/v1",
        "apiKey": "no-auth",
        "models": [{"id": "kilo-auto/free", "name": "Kilo Auto Free"}]
      }
    }
  }
}

Notes

This solution is backward compatible with existing configuration keys and does not affect providers that use real API keys.

Recommendation

Apply the workaround by adding the "no-auth" marker to the configuration for free providers, as this allows the use of free AI models without requiring API keys.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING