Skip to content

feat(openclaw): add missing provider runtime hooks and non-interactive auth #16

@SPIKESPIGEL404

Description

@SPIKESPIGEL404

Summary

Based on the updated OpenClaw plugin documentation, the BitRouter plugin is missing several provider runtime hooks and auth capabilities that would significantly improve UX.

Improvements

1. Add augmentModelCatalog + suppressBuiltInModel hooks (High Priority)

  • augmentModelCatalog — Append synthetic model rows so openclaw models list shows BitRouter-routed models with proper metadata
  • suppressBuiltInModel — Hide upstream built-in models that BitRouter is intercepting to avoid duplicates in model listings

2. Add buildMissingAuthMessage + buildAuthDoctorHint hooks (High Priority)

  • buildMissingAuthMessage — Replace generic "missing auth" errors with BitRouter-specific guidance (e.g., "Run openclaw bitrouter setup to configure your provider")
  • buildAuthDoctorHint — Integrate with openclaw plugins doctor to provide actionable repair hints when auth is misconfigured

3. Add runNonInteractive auth path (High Priority)

  • Support headless/CI environments where users set env vars and expect BitRouter to activate without interactive prompts
  • Detect BITROUTER_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY, etc. and auto-configure

Context

The OpenClaw plugin docs define 22 provider runtime hooks. The BitRouter plugin currently only implements ~2 (before_model_resolve for routing, basic formatApiKey for auth). Adding these hooks will:

  • Make BitRouter models visible in openclaw models list
  • Eliminate duplicate model entries
  • Provide clear, actionable error messages
  • Support CI/CD and headless deployments

References

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions