Environment
- pi coding agent, @getpipher/vision 0.5.2
- Primary model: deepseek-v4-flash (text-only) → DELEGATE mode
- Vision model: kimi k3-256k (via the built-in
kimi-coding provider, OAuth subscription)
Problem 1: wrong endpoint path (404)
callVisionModel requests ${visionModel.baseUrl}/chat/completions.
The built-in kimi-coding provider has baseUrl: https://api.kimi.com/coding (it uses the Anthropic Messages API, /v1/messages). Concatenating gives https://api.kimi.com/coding/chat/completions → 404.
Kimi's OpenAI-compatible endpoint is https://api.kimi.com/coding/v1/chat/completions (with the OAuth access token as Bearer).
Workaround: users must register a separate provider in models.json with baseUrl: https://api.kimi.com/coding/v1 + api: openai-completions, which is non-obvious and breaks the "just point at kimi-coding/k3" expectation.
Problem 2: hardcoded temperature: 0 is rejected by kimi (400)
lib/delegate.ts hardcodes temperature: 0. Kimi's OpenAI-compatible endpoint rejects it for k3/k3-256k:
400 invalid temperature: only 1 is allowed for this model
This makes kimi vision models completely unusable through the extension. Local fix: drop the temperature field (kimi defaults to 1).
Suggested fixes
- Omit
temperature (or make it configurable) in callVisionModel — kimi requires 1, and temperature is irrelevant for image description anyway.
- For the endpoint: either document the baseUrl-with-
/v1 workaround for kimi, or make the path join smarter (e.g. respect a baseUrl that already contains the API prefix).
Happy to submit a PR if useful.
Environment
kimi-codingprovider, OAuth subscription)Problem 1: wrong endpoint path (404)
callVisionModelrequests${visionModel.baseUrl}/chat/completions.The built-in
kimi-codingprovider hasbaseUrl: https://api.kimi.com/coding(it uses the Anthropic Messages API,/v1/messages). Concatenating giveshttps://api.kimi.com/coding/chat/completions→ 404.Kimi's OpenAI-compatible endpoint is
https://api.kimi.com/coding/v1/chat/completions(with the OAuth access token as Bearer).Workaround: users must register a separate provider in models.json with
baseUrl: https://api.kimi.com/coding/v1+api: openai-completions, which is non-obvious and breaks the "just point at kimi-coding/k3" expectation.Problem 2: hardcoded
temperature: 0is rejected by kimi (400)lib/delegate.tshardcodestemperature: 0. Kimi's OpenAI-compatible endpoint rejects it for k3/k3-256k:This makes kimi vision models completely unusable through the extension. Local fix: drop the
temperaturefield (kimi defaults to 1).Suggested fixes
temperature(or make it configurable) incallVisionModel— kimi requires 1, and temperature is irrelevant for image description anyway./v1workaround for kimi, or make the path join smarter (e.g. respect a baseUrl that already contains the API prefix).Happy to submit a PR if useful.