fix: address Gadfly findings on kimi provider
- kimi:// DSN scheme: missing-credential hint now names the LLM_<NAME> env var that defines the provider (its token comes from the DSN, not KIMI_API_KEY), matching providerFor's lazy-resolution key form. Fixes the correctness/error-handling findings that the old hint misdirected users to set KIMI_API_KEY when the fix is adding a token to the DSN. - parse_test.go: add kimi to TestBuiltinsResolve. (llama-swap stays excluded and is now documented — its no-URL built-in errors at Model() construction, not just on use, so it can't resolve there; the finding's llama-swap half was a false lead the test surfaced.) - Add TestKimiSchemeMissingToken covering the corrected hint. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
+3
-1
@@ -213,7 +213,9 @@ func TestBuiltinsResolve(t *testing.T) {
|
||||
r := newTestRegistry(t)
|
||||
// All built-in provider names resolve even before their client
|
||||
// implementations land (stub providers error only on use).
|
||||
for _, name := range []string{"openai", "anthropic", "google", "ollama", "ollama-cloud", "foreman"} {
|
||||
// Note: llama-swap is intentionally excluded — its no-URL built-in errors
|
||||
// at Model() construction (not just on use), so it can't resolve here.
|
||||
for _, name := range []string{"openai", "kimi", "anthropic", "google", "ollama", "ollama-cloud", "foreman"} {
|
||||
if _, err := r.Parse(name + "/anything"); err != nil {
|
||||
t.Errorf("Parse(%s/anything): %v", name, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user