#investigation(API Request): Sudden 'Could not resolve authentication method'

8 messages · Page 1 of 1 (latest)

bronze trail
#

I just saw this on my cli console. As you can see the API is set up correctly and worked up to that random point.

I am using that same API with the same setup in KK VSCode and it works fine. At least if it ever ran into the same issue, it quietly recovered.

The API is an OpenAI compatible Azure endpoint behind a Microsoft APIM gateway.

 ⟳ API Request in progress...
 ✓ API Request - Cost: $0.0000
 ⟳ API Request in progress...
 ✓ API Request - Cost: $0.0000
 :floppy_disk: Checkpoint Saved (e65c92396b598ba29c9e35e59e36a1e41f349bf8)
 ⟳ API Request in progress...

 :hourglass_flowing_sand: API Request retry   Could not resolve authentication method. Expected
 delayed...            either apiKey or authToken to be set. Or for one of the
                       "X-Api-Key" or "Authorization" headers to be explicitly
                       omitted
bronze trail
#

Resolved: I did not have a provider named "default" configured and the issue appeared when Kilo tried to switch to a new mode which by default was using the non exisent provider "default". hooking up all modes to providers in secrets.json resolved the issue. I really wish we had a configuration 'UI' 🙂

gusty kernel
#

@bronze trail the configuration UI is part of the latest release!

bronze trail
#

Cool. Thanks @gusty kernel

#

The latest release I can see is 0.23.1 and it still opens a text editor with my config.json. Or do you mean upcoming release?

gusty kernel
#

The fix only changes the initial provider selection when no config.json exists yet. But we can add one for /provider so that /provider add would open up the same configuration UI. Would that work for you?

bronze trail
#

ahh, i thought kilocode config had a ui now.
Config UI is definitely a much appreciated feature. Especially for provider configuration. But that is currently not my issue.
I am running kilocode-cli on CI. The bigger issue is the different config files. I need to create and copy 3 config files. Two of them undocumented. One json in json 🙂

  • global.state.json assigns IDs for my models to use in secrets.json
  • secrets.json to assign providers to modes
  • Obviousely config.json

Would be great if copying config.json would be enough to replicate your setup.

And all three contain my API keys which for security best practice I need to sanitize and on CI fill back in with the key form CI secrets.

#

And I do not understand why I need a provider with the exact name 'default'. I think in VSCode modes use the active provider if not configured with anything else