Skip to content

Fix Shelley using exe.dev credits for tool calls with BYOK #142

@exedev-shelley

Description

@exedev-shelley

Author: tonezime
Channel: #feedback
Link: https://discord.com/channels/1405685085923049482/1405686161791516873/1478365620868223114


Issue

Shelley attempts to use search tools that consume exe.dev credits even when BYOK (Bring Your Own Key) is configured, causing tool call failures when credits are exhausted.

Context

The issue occurs in the PreferredToolModels selection logic in claudetool/keyword.go. When preferred models aren't available, the system falls back to the first available model from the provider's list, which may include credit-consuming models even when BYOK is enabled.

Relevant code:

  • PreferredToolModels list includes credit-based models
  • selectBestLLM() falls back to GetAvailableModels()[0] when no preferred match exists
  • This causes tool operations to unexpectedly consume exe.dev credits

Suggested Fixes

Quick fixes:

  • Remove all credit-based models from the available models list when BYOK is active
  • Prioritize custom/proxied models at the front of the PreferredToolModels list

Long-term solutions:

  • Filter out non-custom models when making tool calls from conversations using custom models
  • Add explicit "use this model for tool calls" configuration option
  • Implement a generous daily limit for cheaper models as a fallback when credits are exhausted

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions