mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
* feat: add AI image generation tool Port the legacy generate_image tool to the opencode-based CLI as a Kilo-owned tool gated by experimental.image_generation config flag. - New generate_image tool with prompt/path/image/model params - Routes through Kilo Gateway (zero-config) or BYO OpenRouter key - Supports text-to-image generation and image editing - Dynamic model discovery via GET /kilo/models/images endpoint - VS Code settings toggle + live model dropdown in Experimental tab - Writes image to disk and returns inline FilePart attachment - Fallback model catalog for offline resilience * refactor: change default image model to openrouter/auto * fix: address bot review feedback - Remove unused fetchKiloImageModels import in tool - Normalize jpg→jpeg MIME in parser, input image, and attachment - Replace mismatched extensions in ensureExtension (not just append) - Add assertExternalDirectoryEffect for output path traversal guard - Map unauthorized errors to 401 (not 400) in image models handler - Keep last known model list on fetch failure (don't overwrite with empty) - Fix tool description (remove false web search claim, fix grammar) - Remove duplicated provider resolver tests * fix: add retry for image models request to handle backend startup race * fix(image-generation): address kilo bot review comments - ensureExtension replaces mismatched image extensions instead of appending (photo.jpg + PNG -> photo.png, not photo.jpg.png) - Gateway /models/images normalizes errors to 400/401 matching every other gateway route (was leaking undeclared upstream statuses) - Add 401 response to openapi.json + SDK types for /kilo/models/images to match the gateway's errors(400, 401) declaration * fix(gateway): align /models/images error handling with other gateway routes * refactor: switch image generation to effect HttpClient * test: cover kilo models images endpoint in httpapi exercise scenarios * Exclude POST-only and parameterized API endpoints from link checker * Add ImageModelsProvider to agent manager context tree * chore(deps): bump @openrouter/ai-sdk-provider to 2.10.0 Switches imageModel() to OpenRouter's POST /api/v1/images endpoint for proper image usage/billing and image-specific params. * fix: address image generation PR review feedback - revert @openrouter/ai-sdk-provider 2.9.0->2.10.0 bump (image tool uses raw HTTP, not the SDK) - translate image generation settings strings across all locales - use central KILO_OPENROUTER_BASE instead of hardcoded URL fallback - remove completed plan file * chore: refresh source-links.md after URL refactor
65 lines
2.3 KiB
TOML
65 lines
2.3 KiB
TOML
root_dir = "."
|
|
fallback_extensions = ["md"]
|
|
remap = ["kilo-docs/docs kilo-docs/pages"]
|
|
|
|
format = "detailed"
|
|
max_redirects = 2
|
|
max_retries = 3
|
|
retry_wait_time = 5
|
|
exclude_path = ["node_modules"]
|
|
|
|
accept = [
|
|
"200",
|
|
"202",
|
|
"403",
|
|
"429",
|
|
"301",
|
|
"307",
|
|
]
|
|
|
|
exclude = [
|
|
'\.png$',
|
|
'https://synthetic.new/user-settings/api',
|
|
'https://platform.slack-edge.com/img/add_to_slack.png',
|
|
'https://console.groq.com/pages/models',
|
|
'^https?://([A-Za-z0-9-]+\.)?glama\.ai(/|$)',
|
|
'^https?://(api|console)\.mistral\.ai',
|
|
'^https?://codestral\.mistral\.ai/v1/fim/completions/?$',
|
|
'^https?://api\.inceptionlabs\.ai/v1/fim/completions/?$',
|
|
'^https?://(app|console)\.requesty\.ai',
|
|
'^https?://(cloud|console)\.google\.ai',
|
|
# API endpoint prefixes are valid but return 4xx to plain GET link checks.
|
|
'^https?://ai-gateway\.vercel\.sh/v1/?$',
|
|
'^https?://api\.voyageai\.com/v1/embeddings/?$',
|
|
'^https?://inference\.do-ai\.run/v1/?$',
|
|
'^https?://generativelanguage\.googleapis\.com/v1beta/openai/?$',
|
|
# OpenRouter chat-completions is a POST-only endpoint; GET probes return 404
|
|
'^https?://openrouter\.ai/api/v1/chat/completions/?$',
|
|
'^https?://search\.parallel\.ai/mcp/?$',
|
|
# xAI API and OAuth endpoints require request parameters or reject plain link checks.
|
|
'^https?://api\.x\.ai/v1/?$',
|
|
'^https?://accounts\.x\.ai/?$',
|
|
'^https?://auth\.x\.ai/?$',
|
|
'^https?://auth\.x\.ai/oauth2/(authorize|device/code|token)/?$',
|
|
'https://opencode.ai/pages/config',
|
|
'^localhost:3000/',
|
|
'https://tbench.ai/',
|
|
# GitHub URLs cause persistent HTTP/2 protocol errors when checked from GitHub Actions runners
|
|
'^https?://github\.com/',
|
|
# Redirects to login page, blocked by bots
|
|
'^https?://vercel\.link/',
|
|
# API base URL, returns 404 when fetched directly
|
|
'^https?://api\.apertis\.ai/v1/?$',
|
|
# Redirects to authenticated Google Cloud console
|
|
'^https?://console\.cloud\.google\.com',
|
|
# Linear intermittently returns 503 to CI link checks.
|
|
'^https?://linear\.app/?$',
|
|
# Consistently times out in CI
|
|
'^https?://opncd\.ai',
|
|
'^https?://zod\.dev/v4/changelog',
|
|
# Example punycode domain used in homograph attack documentation — does not exist
|
|
'^https?://xn--pitest',
|
|
# OpenAI docs return 404 to plain GET link checks but resolve in browsers
|
|
'^https?://platform\.openai\.com/docs/api-reference/responses/create',
|
|
]
|