Skip to content

remote config update, sonnet 4.6 name fix + gemini 3.1 pro#1062

Merged
scosman merged 0 commit intoremote_configfrom
main
Feb 20, 2026
Merged

remote config update, sonnet 4.6 name fix + gemini 3.1 pro#1062
scosman merged 0 commit intoremote_configfrom
main

Conversation

@tawnymanticore
Copy link
Collaborator

@tawnymanticore tawnymanticore commented Feb 19, 2026

What does this PR do?

remote config update, sonnet 4.6 name fix + gemini 3.1 pro

looks like there are merge conflicts

Checklists

  • Tests have been run locally and passed
  • New tests have been added to any work in /lib

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 19, 2026

Important

Review skipped

Too many files!

This PR contains 230 files, which is 80 over the limit of 150.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch main

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@tawnymanticore
Copy link
Collaborator Author

hang on, why are there merge conflicts? that's unusual

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @tawnymanticore, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a significant new feature for prompt optimization, allowing users to automatically refine their AI model prompts based on evaluation data. It also overhauls the internal model management system to support user-defined custom models with flexible configurations. A foundational change is the implementation of session reuse for MCP tools, which is critical for enabling stateful interactions with external services. Complementary updates include a comprehensive refresh of the kiln-add-model skill documentation and various UI/UX improvements across the application.

Highlights

  • Enhanced AI Model Management: Introduced a new user model registry and API endpoints for adding, listing, and deleting custom AI models. This allows users to integrate models beyond Kiln's built-in list, including custom OpenAI-compatible providers, with configurable overrides for model capabilities.
  • New Prompt Optimization Feature: Implemented a comprehensive 'Prompt Optimization' workflow, enabling users to automatically refine prompts using evaluators and training data. This includes new API endpoints, UI pages, and data models to manage optimization jobs, check model/eval compatibility, and create optimized prompts and run configurations.
  • Improved kiln-add-model Skill: The kiln-add-model skill documentation has been significantly updated to provide clearer, more systematic guidance for integrating new AI models. This includes refined workflows for model discovery, context gathering, code changes, and testing, emphasizing authoritative slug verification and dual-signal flag setting.
  • MCP Session Reuse Implementation: Designed and implemented a mechanism for reusing MCP (Model Context Protocol) sessions across tool calls within an agent run. This uses contextvars for implicit session ID propagation and AsyncExitStack for robust transport lifecycle management, addressing limitations of prior designs that broke stateful MCP servers.
  • Updated AI Model Configurations: Added new AI models to Kiln's built-in list, including 'Claude 4.6 Sonnet', 'Gemini 3.1 Pro Preview', 'Grok 4.1 Fast', 'Qwen 3.5 Plus', 'Qwen 3.5 397B (17B Active)', and 'Minimax M2.5'. Existing model configurations were also refined, and the 'Best Quality' RAG config was updated to use Gemini 3.1 Pro.
  • UI/UX Enhancements: Introduced new UI components like Banner, Float, MarkdownBlock, and CopilotAuthPage. The model library page received a major overhaul with pricing data, dynamic layout, and improved filtering. Run configurations now support a 'starred' status and can be edited via a dedicated page.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • .cursor/skills/kiln-add-model/SKILL.md
    • Rewrote the skill's description and workflow, adding a 'Model Discovery' phase and clarifying global rules.
    • Refined guidance for setting model flags, prioritizing LiteLLM catalog data and cross-checking with predecessors.
    • Updated multimodal capabilities section, clarifying rules for various flags and MIME types, and emphasizing OpenRouter PDF handling.
    • Renamed and reorganized testing phases, added a 'Test Summary' format, and introduced a 'Slug Lookup Reference' section.
    • Updated 'Provider-Specific Quirk Reference' for Anthropic and OpenAI, and expanded the 'Slug Lookup Reference' with curl commands.
  • .gitignore
    • Added '.mcp.json' to the ignore list.
  • .planning/projects/mcp_sessions/01_codebase_findings.md
    • Added a new document detailing findings on MCP session lifecycle, agent/sub-agent architecture, async patterns, and transport lifecycle.
  • .planning/projects/mcp_sessions/02_design_report.md
    • Added a new document proposing contextvars and AsyncExitStack for MCP session management and detailing required changes.
  • .planning/projects/mcp_sessions/03_refinement_general_session_id.md
    • Added a new document refining the design to use a general-purpose agent_run_id instead of mcp_session_id.
  • .planning/projects/mcp_sessions/04_refinement_no_ephemeral_fallback.md
    • Added a new document refining the design to remove silent ephemeral fallback from MCPServerTool._call_tool().
  • .planning/projects/mcp_sessions/implementation_plan.md
    • Added a new document outlining a step-by-step implementation plan for MCP session reuse.
  • app/desktop/desktop_server.py
    • Imported and connected the connect_prompt_optimization_job_api.
  • app/desktop/studio_server/api_client/kiln_ai_server_client/api/auth/check_entitlements_v1_check_entitlements_get.py
    • Added a new API client for checking user entitlements.
  • app/desktop/studio_server/api_client/kiln_ai_server_client/api/auth/secure_ping_v1_ping_get.py
    • Formatted the _get_kwargs function with a newline.
  • app/desktop/studio_server/api_client/kiln_ai_server_client/api/auth/verify_api_key_v1_verify_api_key_get.py
    • Formatted the _get_kwargs function with a newline.
  • app/desktop/studio_server/api_client/kiln_ai_server_client/api/health/health_health_get.py
    • Formatted the _get_kwargs function with a newline.
  • app/desktop/studio_server/api_client/kiln_ai_server_client/api/health/ping_ping_get.py
    • Formatted the _get_kwargs function with a newline.
  • app/desktop/studio_server/api_client/kiln_ai_server_client/api/jobs/check_model_supported_v1_jobs_prompt_optimization_job_check_model_supported_get.py
    • Renamed from check_model_supported_v1_jobs_gepa_job_check_model_supported_get.py.
    • Updated API endpoint URL and docstrings from 'GEPA Job' to 'Prompt Optimization Job'.
  • app/desktop/studio_server/api_client/kiln_ai_server_client/api/jobs/get_gepa_job_result_v1_jobs_gepa_job_job_id_result_get.py
    • Renamed to get_prompt_optimization_job_result_v1_jobs_prompt_optimization_job_job_id_result_get.py.
    • Updated API endpoint URL, model imports, and docstrings from 'GEPA Job' to 'Prompt Optimization Job'.
  • app/desktop/studio_server/api_client/kiln_ai_server_client/api/jobs/get_job_status_v1_jobs_job_type_job_id_status_get.py
    • Formatted the _get_kwargs function with a newline.
  • app/desktop/studio_server/api_client/kiln_ai_server_client/api/jobs/get_sample_job_result_v1_jobs_sample_job_job_id_result_get.py
    • Formatted the _get_kwargs function with a newline.
  • app/desktop/studio_server/api_client/kiln_ai_server_client/api/jobs/start_gepa_job_v1_jobs_gepa_job_start_post.py
    • Renamed to start_prompt_optimization_job_v1_jobs_prompt_optimization_job_start_post.py.
    • Updated API endpoint URL, model imports, and docstrings from 'GEPA Job' to 'Prompt Optimization Job'.
    • Added eval_ids to the request body.
  • app/desktop/studio_server/api_client/kiln_ai_server_client/models/init.py
    • Updated imports to reflect renaming of GEPA-related models to Prompt Optimization models.
    • Added new CheckEntitlements and PromptOptimizationJob related models.
  • app/desktop/studio_server/api_client/kiln_ai_server_client/models/body_start_gepa_job_v1_jobs_gepa_job_start_post.py
    • Renamed to body_start_prompt_optimization_job_v1_jobs_prompt_optimization_job_start_post.py.
    • Removed token_budget field and added eval_ids field.
  • app/desktop/studio_server/api_client/kiln_ai_server_client/models/body_start_gepa_job_v1_jobs_gepa_job_start_post_token_budget.py
    • Removed the BodyStartGepaJobV1JobsGepaJobStartPostTokenBudget enum.
  • app/desktop/studio_server/api_client/kiln_ai_server_client/models/check_entitlements_v1_check_entitlements_get_response_check_entitlements_v1_check_entitlements_get.py
    • Added a new model for the entitlements check response.
  • app/desktop/studio_server/api_client/kiln_ai_server_client/models/generate_batch_output_data_by_topic.py
    • Formatted the to_dict method with a newline.
  • app/desktop/studio_server/api_client/kiln_ai_server_client/models/gepa_job_output.py
    • Renamed to prompt_optimization_job_output.py.
    • Updated description from 'GEPA job' to 'prompt optimization job'.
  • app/desktop/studio_server/api_client/kiln_ai_server_client/models/gepa_job_result_response.py
    • Renamed to prompt_optimization_job_result_response.py.
    • Updated description and changed references from GEPAJobOutput to PromptOptimizationJobOutput.
  • app/desktop/studio_server/api_client/kiln_ai_server_client/models/health_health_get_response_health_health_get.py
    • Formatted the to_dict method with a newline.
  • app/desktop/studio_server/api_client/kiln_ai_server_client/models/spec_spec_field_current_values.py
    • Formatted the to_dict method with a newline.
  • app/desktop/studio_server/api_client/kiln_ai_server_client/models/spec_spec_fields.py
    • Formatted the to_dict method with a newline.
  • app/desktop/studio_server/api_client/kiln_ai_server_client/models/specification_input_spec_field_current_values.py
    • Formatted the to_dict method with a newline.
  • app/desktop/studio_server/api_client/kiln_ai_server_client/models/specification_input_spec_fields.py
    • Formatted the to_dict method with a newline.
  • app/desktop/studio_server/api_models/copilot_models.py
    • Removed the copilot_models.py file as models were moved to kiln_ai.datamodel.copilot_models.copilot_api_models.
  • app/desktop/studio_server/copilot_api.py
    • Updated imports to use new Copilot API models from kiln_ai.datamodel.copilot_models.copilot_api_models and kiln_ai.datamodel.copilot_models.questions.
    • Replaced check_response_error with unwrap_response for API response handling.
    • Updated model type references in API endpoints (e.g., TaskInfoApi to TaskInfo).
  • app/desktop/studio_server/eval_api.py
    • Added UpdateRunConfigRequest and UpdateEvalRequest models.
    • Added train_dataset_size to EvalProgress model.
    • Added new PATCH endpoints for updating eval properties and run config properties.
  • app/desktop/studio_server/prompt_optimization_job_api.py
    • Added a new API for managing prompt optimization jobs, including endpoints for checking model/eval support, starting jobs, listing jobs, and retrieving job status/results.
  • app/desktop/studio_server/provider_api.py
    • Added Literal import for type hinting.
    • Imported get_all_user_models, get_legacy_custom_models, and UserModelEntry.
    • Added AvailableProviderInfo model.
    • Modified get_available_models to merge legacy custom models and new user models into provider lists.
    • Added new API endpoints for managing user-defined models (/api/settings/available_providers, /api/settings/user_models).
    • Updated error message for API key verification.
    • Refactored custom_models into legacy_custom_models_as_available and added user_models_as_available to support the new user model registry.
  • app/desktop/studio_server/settings_api.py
    • Imported check_entitlements_v1_check_entitlements_get, get_authenticated_client, get_copilot_api_key, and unwrap_response.
    • Added a new API endpoint /api/check_entitlements for checking user entitlements.
  • app/desktop/studio_server/test_eval_api.py
    • Imported BasePrompt.
    • Added tests for TaskRunConfig's starred field and its PATCH endpoint.
    • Added tests for the PATCH endpoint for updating eval properties (name, description, train_set_filter_id).
  • app/desktop/studio_server/test_provider_api.py
    • Replaced custom_models import with legacy_custom_models_as_available.
    • Replaced test_custom_models with test_legacy_custom_models_as_available.
    • Added extensive tests for the new /api/settings/user_models endpoints (add, delete, duplicates, invalid provider).
  • app/desktop/studio_server/test_settings_api.py
    • Imported AsyncMock, MagicMock, and CheckEntitlementsV1CheckEntitlementsGetResponseCheckEntitlementsV1CheckEntitlementsGet.
    • Added tests for the new /api/check_entitlements endpoint.
  • app/desktop/studio_server/utils/copilot_utils.py
    • Updated imports to use new Copilot API models and unwrap_response.
    • Removed check_response_error function.
    • Updated generate_copilot_examples, create_task_run_from_sample, and create_dataset_task_runs to use new model types.
  • app/desktop/studio_server/utils/response_utils.py
    • Added new utility functions check_response_error, unwrap_response_allow_none, and unwrap_response for consistent API response handling.
  • app/desktop/studio_server/utils/test_copilot_utils.py
    • Updated imports and tests to use new Sample and ReviewedExample models.
  • app/web_ui/package-lock.json
    • Updated fast-xml-parser and openapi-sampler versions.
  • app/web_ui/src/lib/api_schema.d.ts
    • Updated API schema to reflect new endpoints and model changes, including user_models, available_providers, check_entitlements, prompt optimization jobs, UpdateEvalRequest, UpdateRunConfigRequest, and new copilot models.
  • app/web_ui/src/lib/stores.ts
    • Modified available_model_details and provider_name_from_id to handle provider_display_name for custom OpenAI-compatible providers.
  • app/web_ui/src/lib/stores/recent_model_store.test.ts
    • Updated tests to include provider_display_name in RecentModel objects.
  • app/web_ui/src/lib/stores/recent_model_store.ts
    • Added provider_display_name to RecentModel type and addRecentModel function.
  • app/web_ui/src/lib/stores/run_configs_store.ts
    • Added name parameter to save_new_task_run_config.
  • app/web_ui/src/lib/types.ts
    • Updated Copilot API types to reflect new model names (e.g., SyntheticDataGenerationStepConfigInput, TaskMetadata, Sample, GenerateBatchOutput).
    • Added new types for UserModelEntry, AvailableProviderInfo, PublicPromptOptimizationJobStatusResponse, PromptOptimizationJob, and JobStatus.
  • app/web_ui/src/lib/ui/banner.svelte
    • Added a new Svelte component for displaying a banner.
  • app/web_ui/src/lib/ui/carousel_section.svelte
    • Added min_width, min_height props, disabled state handling with a dialog, and a 'Recommended' badge.
  • app/web_ui/src/lib/ui/completed.svelte
    • Refactored to use the Intro component.
  • app/web_ui/src/lib/ui/edit_dialog.svelte
    • Added a close function.
  • app/web_ui/src/lib/ui/fancy_select.svelte
    • Added pointer-events-none to checkbox styling.
  • app/web_ui/src/lib/ui/feature_carousel.svelte
    • Changed from carousel to grid layout, added dynamic column calculation, and metric display.
  • app/web_ui/src/lib/ui/feature_carousel_types.ts
    • Added metrics and made subtitle optional.
  • app/web_ui/src/lib/ui/float.svelte
    • Added a new Svelte component for floating UI elements using @floating-ui/dom.
  • app/web_ui/src/lib/ui/icons/optimize_icon.svelte
    • Added a new SVG icon for optimization.
  • app/web_ui/src/lib/ui/icons/star_icon.svelte
    • Added a new SVG icon for starring items.
  • app/web_ui/src/lib/ui/info_tooltip.svelte
    • Replaced manual markdown parsing with the MarkdownBlock component.
  • app/web_ui/src/lib/ui/intro.svelte
    • Added description_markdown prop and used the MarkdownBlock component.
  • app/web_ui/src/lib/ui/kiln_copilot/copilot_auth_page.svelte
    • Added a new Svelte component for the Copilot authentication flow.
  • app/web_ui/src/lib/ui/kiln_copilot/copilot_required_card.svelte
    • Added a new Svelte component for displaying a card when Copilot is required.
  • app/web_ui/src/lib/ui/kiln_copilot/entitlement_required_card.svelte
    • Added a new Svelte component for displaying a card when a specific entitlement is required.
  • app/web_ui/src/lib/ui/kiln_section_types.ts
    • Added PromptGeneratorItem interface and included it in CarouselSectionItem.
  • app/web_ui/src/lib/ui/markdown_block.svelte
    • Added a new Svelte component for rendering markdown text.
  • app/web_ui/src/lib/ui/property_list.svelte
    • Adjusted styling for badges and overflow.
  • app/web_ui/src/lib/ui/run_config_component/available_models_dropdown.svelte
    • Added provider_display_name handling for custom models.
    • Updated logic for model_value_to_provider_name map.
  • app/web_ui/src/lib/ui/run_config_component/create_new_run_config_dialog.svelte
    • Added hide_tools_selector, model, run_config_name props.
    • Implemented showClone function and dynamic dialog title.
  • app/web_ui/src/lib/ui/run_config_component/run_config_component.svelte
    • Added run_config_name, show_name_field, and model props.
    • Refined model change processing and run config loading logic.
    • Added FormElement for the name field.
  • app/web_ui/src/lib/ui/run_config_component/run_config_details_dialog.svelte
    • Removed the run_config_details_dialog.svelte component.
  • app/web_ui/src/lib/ui/run_config_component/run_config_summary.svelte
    • Changed to navigate to a dedicated run config page instead of opening a dialog.
  • app/web_ui/src/lib/ui/settings_header.svelte
    • Added an optional subtitle prop.
  • app/web_ui/src/lib/ui/warning.svelte
    • Added markdown prop and used the MarkdownBlock component for rendering.
  • app/web_ui/src/lib/utils/entitlement_utils.ts
    • Added new utility functions checkEntitlements and checkPromptOptimizationAccess.
  • app/web_ui/src/lib/utils/form_list.svelte
    • Added hide_add_button prop.
  • app/web_ui/src/lib/utils/link_builder.test.ts
    • Removed tests for generator_details page.
  • app/web_ui/src/lib/utils/link_builder.ts
    • Removed generator_details link logic.
  • app/web_ui/src/lib/utils/name_generator.ts
    • Added a new utility for generating memorable names.
  • app/web_ui/src/routes/(app)/+layout.svelte
    • Added 'Optimize' section to the sidebar navigation with sub-items for Prompts, Models, Fine Tune, and Docs & Search.
  • app/web_ui/src/routes/(app)/dataset/[project_id]/[task_id]/+page.svelte
    • Added text-nowrap to tag display styling.
  • app/web_ui/src/routes/(app)/dataset/[project_id]/[task_id]/add_data/+page.svelte
    • Modified reason parameter handling for the rag template.
  • app/web_ui/src/routes/(app)/docs/[project_id]/+page.svelte
    • Added breadcrumbs for the 'Optimize' section.
  • app/web_ui/src/routes/(app)/docs/rag_configs/[project_id]/add_search_tool/rag_config_templates.ts
    • Updated 'Best Quality' RAG config to use 'Gemini 3.1 Pro'.
  • app/web_ui/src/routes/(app)/fine_tune/[project_id]/[task_id]/+page.svelte
    • Added breadcrumbs for the 'Optimize' section.
  • app/web_ui/src/routes/(app)/generate/[project_id]/[task_id]/+page.svelte
    • Minor error handling change.
  • app/web_ui/src/routes/(app)/models/+page.svelte
    • Refactored the model library page, adding pricing data fetching, a 'Featured' capability filter, dynamic grid layout, and a 'Try' button.
    • Implemented a 'Connect to Provider' dialog and a 'Create New Run Config' dialog.
    • Updated model display to include editorial notes and pricing.
  • app/web_ui/src/routes/(app)/models/price.ts
    • Added a new utility for fetching and managing model pricing data from models.dev.
  • app/web_ui/src/routes/(app)/optimize/[project_id]/[task_id]/+page.svelte
    • Added a new page for the 'Optimize' section, displaying optimization strategies and run configurations, with sorting, selection for comparison, and actions like cloning and setting default.
  • app/web_ui/src/routes/(app)/optimize/[project_id]/[task_id]/optimizers.ts
    • Added a new file defining optimization strategies for the 'Optimize' page.
  • app/web_ui/src/routes/(app)/optimize/[project_id]/[task_id]/run_config/[run_config_id]/+page.svelte
    • Added a new page for viewing and editing individual run configurations.
  • app/web_ui/src/routes/(app)/optimize/[project_id]/[task_id]/run_config/[run_config_id]/+page.ts
    • Set prerender to false for the run config details page.
  • app/web_ui/src/routes/(app)/optimize/[project_id]/[task_id]/run_config/create/+page.svelte
    • Added a new page for creating run configurations, with options to pre-select model or prompt.
  • app/web_ui/src/routes/(app)/optimize/[project_id]/[task_id]/run_config/create/+page.ts
    • Set prerender to false for the create run config page.
  • app/web_ui/src/routes/(app)/prompt_optimization/[project_id]/[task_id]/+page.svelte
    • Added a new page for listing prompt optimization jobs, including status updates, copilot availability checks, and entitlement checks.
  • app/web_ui/src/routes/(app)/prompt_optimization/[project_id]/[task_id]/+page.ts
    • Set prerender to false for the prompt optimization jobs page.
  • app/web_ui/src/routes/(app)/prompt_optimization/[project_id]/[task_id]/create_prompt_optimization_job/+page.svelte
    • Added a new page for creating a prompt optimization job, including run config and eval selection/validation.
  • app/web_ui/src/routes/(app)/prompt_optimization/[project_id]/[task_id]/create_prompt_optimization_job/+page.ts
    • Set prerender to false for the create prompt optimization job page.
  • app/web_ui/src/routes/(app)/prompt_optimization/[project_id]/[task_id]/prompt_optimization_job/[job_id]/+page.svelte
    • Added a new page for viewing details of a specific prompt optimization job, including optimized prompt output and job properties.
  • app/web_ui/src/routes/(app)/prompt_optimization/[project_id]/[task_id]/prompt_optimization_job/[job_id]/+page.ts
    • Set prerender to false for the prompt optimization job details page.
  • app/web_ui/src/routes/(app)/prompt_optimization/copilot_auth/+page.svelte
    • Added a new page for Copilot authentication specific to prompt optimization, using the CopilotAuthPage component.
  • app/web_ui/src/routes/(app)/prompt_optimization/copilot_auth/+page.ts
    • Set ssr to false for the Copilot authentication page.
  • app/web_ui/src/routes/(app)/prompts/[project_id]/[task_id]/+page.svelte
    • Refactored the prompts page, adding 'Optimize' breadcrumbs, a banner for prompt optimization, and a section for editing the base task prompt.
    • Changed prompt listing to a sortable table with actions.
    • Removed the generator_details page.
  • app/web_ui/src/routes/(app)/prompts/[project_id]/[task_id]/create/+page.svelte
    • Modified the prompt creation page to support creating prompts from generators.
    • Added generator_id and generator_name handling.
    • Removed the prompt_description field and updated navigation after creation.
  • app/web_ui/src/routes/(app)/prompts/[project_id]/[task_id]/edit_base_prompt/+page.svelte
    • Added a new page for editing the task's base prompt and thinking instructions.
  • app/web_ui/src/routes/(app)/prompts/[project_id]/[task_id]/edit_base_prompt/+page.ts
    • Set prerender to false for the edit base prompt page.
  • app/web_ui/src/routes/(app)/prompts/[project_id]/[task_id]/generator_details/[generator_id]/+page.svelte
    • Removed the generator_details page.
  • app/web_ui/src/routes/(app)/prompts/[project_id]/[task_id]/prompt_generators/+page.svelte
    • Added a new page for selecting prompt generators, displayed as a carousel, with logic for disabling generators based on data availability.
  • app/web_ui/src/routes/(app)/prompts/[project_id]/[task_id]/prompt_generators/+page.ts
    • Set prerender to false for the prompt generators page.
  • app/web_ui/src/routes/(app)/prompts/[project_id]/[task_id]/prompt_generators/prompt_generators.ts
    • Added a new file defining prompt generator categories and templates, including a getPromptType utility.
  • app/web_ui/src/routes/(app)/prompts/[project_id]/[task_id]/saved/[prompt_id]/+page.svelte
    • Updated the prompt details page to use getPromptType.
    • Removed chain_of_thought_instructions and source_generator from properties.
    • Added 'Optimize' breadcrumbs.
  • app/web_ui/src/routes/(app)/run/+page.svelte
    • Added model prop to RunConfigComponent and initialized it from URL search parameters.
  • app/web_ui/src/routes/(app)/settings/manage_tools/[project_id]/add_tools/+page.svelte
    • Updated sample local MCP servers, including a new 'Linux Sandbox' and 'Memory' tool.
    • Updated installation instructions to use markdown.
  • app/web_ui/src/routes/(app)/settings/manage_tools/[project_id]/add_tools/local_mcp/edit_local_tool.svelte
    • Added trusted and markdown props to the Warning component for installation instructions.
  • app/web_ui/src/routes/(app)/settings/providers/add_models/+page.svelte
    • Refactored the add custom models page, replacing legacy custom_models with user_models.
    • Added new form fields for display name and advanced overrides (structured output, logprobs, vision, reasoning, parser).
    • Updated breadcrumbs and model listing to use the new UserModelEntry structure.
  • app/web_ui/src/routes/(app)/specs/[project_id]/[task_id]/+page.svelte
    • Updated imports for checkKilnCopilotAvailable.
    • Added Banner component and refactored the 'Compare' section to use it.
  • app/web_ui/src/routes/(app)/specs/[project_id]/[task_id]/[spec_id]/+page.svelte
    • Added max_length to the spec name input.
  • app/web_ui/src/routes/(app)/specs/[project_id]/[task_id]/[spec_id]/[eval_id]/+page.svelte
    • Added 'Training Dataset' property to eval details.
    • Added max_length to the eval name input.
  • app/web_ui/src/routes/(app)/specs/[project_id]/[task_id]/compare/+page.svelte
    • Added breadcrumbs logic based on the from query parameter.
  • app/web_ui/src/routes/(app)/specs/[project_id]/[task_id]/spec_builder/+page.svelte
    • Updated imports to use new Copilot API model names.
  • app/web_ui/src/routes/(app)/specs/[project_id]/[task_id]/spec_utils.ts
    • Removed checkKilnCopilotAvailable (now in utils/copilot_utils.ts).
  • app/web_ui/src/routes/(app)/specs/copilot_auth/+page.svelte
    • Refactored to use the CopilotAuthPage component.
  • app/web_ui/src/routes/(fullscreen)/setup/(setup)/create_task/edit_task.svelte
    • Added Collapse component.
    • Updated prompt description for task requirements.
    • Refactored the requirements section into a collapsible 'Advanced Options' with a 'Deprecated' badge.
  • app/web_web_ui/src/lib/utils/copilot_utils.ts
    • Added a new utility function checkKilnCopilotAvailable.
  • hooks_mcp.yaml
    • Added a new check_all action.
  • libs/core/kiln_ai/adapters/adapter_registry.py
    • Imported find_user_model.
    • Updated litellm_core_provider_config to handle new user model registry entries and legacy openai_compatible providers.
  • libs/core/kiln_ai/adapters/ml_model_list.py
    • Added claude_sonnet_4_6, gemini_3_1_pro_preview, grok_4_1_fast, qwen_3p5_plus, qwen_3p5_397b_a17b, and minimax_m2_5 models.
    • Updated existing model configurations (e.g., removed suggested_for_evals from older Gemini models).
    • Added featured_rank and editorial_notes to some models.
  • libs/core/kiln_ai/adapters/model_adapters/base_adapter.py
    • Imported agent_run_id context management functions and MCPSessionManager.
    • Implemented invoke_returning_run_output to manage agent run context and MCP session cleanup.
  • libs/core/kiln_ai/adapters/model_adapters/test_base_adapter.py
    • Added TestAgentRunContextLifecycle with tests for invoke setting/clearing run context, sub-agent inheritance, and cleanup_session calls.
  • libs/core/kiln_ai/adapters/prompt_builders.py
    • Adjusted formatting for chain of thought prompt.
    • Removed ShortPromptBuilder.
  • libs/core/kiln_ai/adapters/provider_tools.py
    • Imported UserModelEntry.
    • Added get_all_user_models, get_legacy_custom_models, user_model_to_provider, and find_user_model functions for managing user-defined models.
    • Updated core_provider and kiln_model_provider_from to handle the new user model registry.
  • libs/core/kiln_ai/adapters/test_adapter_registry.py
    • Added tests for adapter creation with user models (builtin and custom providers).
  • libs/core/kiln_ai/adapters/test_ml_model_list.py
    • Imported UserModelEntry.
    • Added TestUserModelEntry with comprehensive tests for the UserModelEntry model and its properties.
  • libs/core/kiln_ai/adapters/test_prompt_builders.py
    • Removed ShortPromptBuilder tests.
  • libs/core/kiln_ai/adapters/test_provider_tools.py
    • Imported new user model related functions.
    • Added fixtures and tests for get_all_user_models, get_legacy_custom_models, user_model_to_provider, find_user_model, and core_provider with user models.
  • libs/core/kiln_ai/datamodel/init.py
    • Imported PromptOptimizationJob.
  • libs/core/kiln_ai/datamodel/copilot_models/copilot_api_models.py
    • Added a new file containing Pydantic models for the Copilot API (Generate Batch, Clarify Spec, Refine Spec, Spec Questioner).
  • libs/core/kiln_ai/datamodel/copilot_models/questions.py
    • Imported SpecificationInput from copilot_api_models.
    • Removed NewProposedSpecEditApi and RefineSpecApiOutput (now in copilot_api_models).
  • libs/core/kiln_ai/datamodel/copilot_models/test_copilot_api_models.py
    • Renamed from app/desktop/studio_server/api_models/test_copilot_models.py.
    • Updated imports and tests to reflect new Copilot API model names and structure.
  • libs/core/kiln_ai/datamodel/copilot_models/test_questions.py
    • Updated imports to use new Copilot API models.
  • libs/core/kiln_ai/datamodel/datamodel_enums.py
    • Updated Priority description.
  • libs/core/kiln_ai/datamodel/eval.py
    • Added migrate_train_set_filter_id model validator to auto-create train_set_filter_id for legacy evals.
  • libs/core/kiln_ai/datamodel/prompt_id.py
    • Removed the SHORT prompt generator.
  • libs/core/kiln_ai/datamodel/prompt_optimization_job.py
    • Added a new Pydantic model for PromptOptimizationJob.
  • libs/core/kiln_ai/datamodel/run_config.py
    • Added a starred field to TaskRunConfig.
  • libs/core/kiln_ai/datamodel/spec.py
    • Updated SyntheticDataGenerationSessionConfig to use new Copilot API models.
  • libs/core/kiln_ai/datamodel/task.py
    • Added a thinking_instruction field.
    • Added a prompt_optimization_jobs method.
  • libs/core/kiln_ai/datamodel/test_eval.py
    • Added a test for the migrate_train_set_filter_id model validator.
  • libs/core/kiln_ai/datamodel/test_run_config.py
    • Added tests for the starred field in TaskRunConfig.
  • libs/core/kiln_ai/datamodel/test_task.py
    • Added tests for thinking_instruction and the prompt_optimization_jobs method.
  • libs/core/kiln_ai/run_context.py
    • Added a new module for managing agent run context using contextvars.
  • libs/core/kiln_ai/test_run_context.py
    • Added tests for run_context.py.
  • libs/core/kiln_ai/tools/mcp_server_tool.py
    • Imported get_agent_run_id.
    • Modified _call_tool to use cached sessions and raise an error if agent_run_id is missing.
    • Ensured _get_tool retains ephemeral fallback.
  • libs/core/kiln_ai/tools/mcp_session_manager.py
    • Implemented MCP session caching using AsyncExitStack and asyncio.Lock.
    • Added get_or_create_session and cleanup_session methods.
  • libs/core/kiln_ai/tools/test_mcp_server_tool.py
    • Added tests for _call_tool and _get_tool with agent run context.
  • libs/core/kiln_ai/tools/test_mcp_session_manager.py
    • Added tests for mcp_session_manager.py.
  • libs/core/kiln_ai/utils/config.py
    • Added user_model_registry to the Config model.
  • libs/core/kiln_ai/utils/test_config.py
    • Added a test for user_model_registry in Config.
Activity
  • The pull request description indicates that local tests were run and passed.
  • New tests have been added to /lib as part of the changes.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a comprehensive 'Optimize' section to the Kiln UI, enabling users to manage run configurations and initiate automatic prompt optimization jobs. It also updates the model library with several new models, including Claude 4.6 Sonnet and Gemini 3.1 Pro, and enhances custom model management with advanced settings. The backend has been updated to support these features, including a new API for prompt optimization and an improved user model registry. Overall, the changes are well-structured and follow established patterns in the codebase, though some improvements in UI robustness and error handling are recommended.

Comment on lines +439 to +441
if (!task) {
throw new Error("Task not found")
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The current implementation throws an error if no task is selected, which prevents users from browsing the model library when navigating directly to /models from the sidebar if a task hasn't been previously selected. This is a regression in user experience. The page should ideally allow browsing models even without a task context, while disabling or hiding task-specific actions like 'Try' or 'Create Run Config'.

}
</script>

{#each markdown_text.replace(/\\n/g, "\n").split("\n") as line}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The markdown_text variable should be checked for null or undefined before calling .replace() to prevent a potential runtime crash if the component is rendered with missing data.

{#each (markdown_text || "").replace(/\\n/g, "\n").split("\n") as line}

@scosman scosman merged commit e80c067 into remote_config Feb 20, 2026
29 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants