MoonshotAI / MoonshotAI/kimi-code

WebSearch tool unavailable after login until API key is manually configured

Open
#696 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
7.5k
Forks
1.2k
Avg merge
11h 53m
Merged PRs (30d)
350

Description

What version of Kimi Code is running?

0.14.2

Which open platform/subscription were you using?

Kimi Coding

Which model were you using?

K2.7 Code thinking

What platform is your computer?

Linux 6.6.114.1-microsoft-standard-WSL2 x86_64 x86_64

What issue are you seeing?

After successfully logging in to Kimi Code, the WebSearch tool does not work out of the box. It only becomes functional after manually adding an API key to two sections in config.toml:

• [services.moonshot_search]
• [services.moonshot_fetch]

The key must be generated from https://www.kimi.com/code/console.

This is confusing because login appears to complete successfully, yet WebSearch remains non-functional without this extra manual step.

What steps can reproduce the bug?
  1. Install and launch Kimi Code.
  2. Complete the login flow.
  3. Start a session and invoke WebSearch.
  4. Observe that WebSearch does not return results (or appears disabled).
  5. Open ~/.kimi-code/config.toml.
  6. Add/update the api_key field under both [services.moonshot_search] and [services.moonshot_fetch] with a key from https://www.kimi.com/code/console.
  7. Restart Kimi Code and retry WebSearch — it now works.
What is the expected behavior?

After login, WebSearch should work immediately, like other built-in tools. If an additional API key is mandatory, the user should be clearly prompted to configure it.

Additional information

Actual behavior

WebSearch is silently unavailable after login. There is no in-app guidance indicating that api_key must be set in both [services.moonshot_search] and [services.moonshot_fetch].

Manual workaround

Edit ~/.kimi-code/config.toml:

  [services.moonshot_search]
  base_url = "https://api.kimi.com/coding/v1/search"
  api_key = "<API_KEY_FROM_CONSOLE>"

  [services.moonshot_search.oauth]
  storage = "file"
  key = "oauth/kimi-code"

  [services.moonshot_fetch]
  base_url = "https://api.kimi.com/coding/v1/fetch"
  api_key = "<API_KEY_FROM_CONSOLE>"

  [services.moonshot_fetch.oauth]
  storage = "file"
  key = "oauth/kimi-code"

After saving and restarting, WebSearch works.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace WebSearch's service configuration and post-login setup, using ~/.kimi-code/config.toml and the [services.moonshot_search] and [services.moonshot_fetch] entries as starting points. Reproduce on Linux/WSL2 with Kimi Code 0.14.2; done means WebSearch works after login or clearly prompts for the required API key.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.