Skip to content

Update docs for v0.22#702

Merged
scosman merged 281 commits intodocsfrom
main
Oct 6, 2025
Merged

Update docs for v0.22#702
scosman merged 281 commits intodocsfrom
main

Conversation

@scosman
Copy link
Copy Markdown
Collaborator

@scosman scosman commented Oct 6, 2025

No description provided.

scosman and others added 27 commits October 3, 2025 19:22
Strip whitespace from descriptions of tools
Tools selector properly multiple tool sets of same type
…ys-there-on-project-switch

fix: rag store does not clear on project switch
…ce-changed-broke-ragtool

fix: kiln tool interface run method change
…and-glm-45v

feat: add GLM 4.5V extractor
@scosman scosman merged commit e9fb939 into docs Oct 6, 2025
19 checks passed
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Oct 6, 2025

Important

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

37 files out of 145 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 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.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 6, 2025

📊 Coverage Report

Overall Coverage: 92%

Diff: origin/docs...HEAD

  • app/desktop/studio_server/eval_api.py (100%)
  • app/desktop/studio_server/settings_api.py (25.0%): Missing lines 43-47,49-52
  • app/desktop/studio_server/tool_api.py (98.9%): Missing lines 612
  • libs/core/kiln_ai/adapters/extractors/litellm_extractor.py (100%)
  • libs/core/kiln_ai/adapters/ml_embedding_model_list.py (100%)
  • libs/core/kiln_ai/adapters/model_adapters/litellm_adapter.py (100%)
  • libs/core/kiln_ai/datamodel/basemodel.py (94.1%): Missing lines 617
  • libs/core/kiln_ai/datamodel/external_tool_server.py (95.5%): Missing lines 111-112,266,268,280,313
  • libs/core/kiln_ai/datamodel/extraction.py (100%)
  • libs/core/kiln_ai/datamodel/task.py (100%)
  • libs/core/kiln_ai/datamodel/task_output.py (100%)
  • libs/core/kiln_ai/datamodel/tool_id.py (93.8%): Missing lines 77
  • libs/core/kiln_ai/tools/base_tool.py (100%)
  • libs/core/kiln_ai/tools/built_in_tools/math_tools.py (100%)
  • libs/core/kiln_ai/tools/kiln_task_tool.py (100%)
  • libs/core/kiln_ai/tools/mcp_server_tool.py (100%)
  • libs/core/kiln_ai/tools/mcp_session_manager.py (92.6%): Missing lines 198,217
  • libs/core/kiln_ai/tools/rag_tools.py (100%)
  • libs/core/kiln_ai/tools/tool_registry.py (100%)
  • libs/core/kiln_ai/utils/filesystem.py (0.0%): Missing lines 8,10,12,14
  • libs/core/kiln_ai/utils/open_ai_types.py (100%)
  • libs/core/kiln_ai/utils/pdf_utils.py (100%)
  • libs/server/kiln_server/document_api.py (100%)
  • libs/server/kiln_server/run_api.py (100%)
  • libs/server/kiln_server/server.py (66.7%): Missing lines 20-21
  • libs/server/kiln_server/task_api.py (100%)

Summary

  • Total: 549 lines
  • Missing: 26 lines
  • Coverage: 95%

Line-by-line

View line-by-line diff coverage

app/desktop/studio_server/settings_api.py

Lines 39-53

  39             raise HTTPException(status_code=500, detail=str(e))
  40 
  41     @app.post("/api/open_project_folder/{project_id}")
  42     def open_project_folder(project_id: str):
! 43         try:
! 44             project = project_from_id(project_id)
! 45             path = project.path
! 46             if not path:
! 47                 raise HTTPException(status_code=500, detail="Project path not found")
  48 
! 49             open_folder(path)
! 50             return {"message": "opened"}
! 51         except Exception as e:
! 52             raise HTTPException(status_code=500, detail=str(e))

app/desktop/studio_server/tool_api.py

Lines 608-616

  608         _validate_kiln_task_tool_task_and_run_config(project_id, tool_data)
  609 
  610         existing_tool_server = tool_server_from_id(project_id, tool_server_id)
  611         if existing_tool_server.type != ToolServerType.kiln_task:
! 612             raise HTTPException(
  613                 status_code=400,
  614                 detail="Existing tool server is not a kiln task tool. You can't edit a non-kiln task tool with this endpoint.",
  615             )

libs/core/kiln_ai/datamodel/basemodel.py

Lines 613-621

  613         # Note: we're using the in-file ID. We could make this faster using the path-ID if this becomes perf bottleneck, but it's better to have 1 source of truth.
  614         for child_path in cls.iterate_children_paths_of_parent_path(parent_path):
  615             child_id = ModelCache.shared().get_model_id(child_path, cls)
  616             if child_id in ids:
! 617                 children[child_id] = cls.load_from_file(child_path)
  618             if child_id is None:
  619                 child = cls.load_from_file(child_path)
  620                 if child.id in ids:
  621                     children[child.id] = child

libs/core/kiln_ai/datamodel/external_tool_server.py

Lines 107-116

  107                         self._unsaved_secrets[key_name] = env_vars[key_name]
  108                         # Remove from env_vars immediately so they are not saved to file
  109                         del env_vars[key_name]
  110 
! 111             case ToolServerType.kiln_task:
! 112                 pass
  113 
  114             case _:
  115                 raise_exhaustive_enum_error(self.type)

Lines 262-272

  262                 validate_return_dict_prop(
  263                     properties, "run_config_id", str, err_msg_prefix
  264                 )
  265 
! 266             case _:
  267                 # Type checking will catch missing cases
! 268                 raise_exhaustive_enum_error(server_type)
  269         return data
  270 
  271     @model_validator(mode="before")
  272     def validate_headers_and_env_vars(cls, data: dict) -> dict:

Lines 276-284

  276         type = ExternalToolServer.type_from_data(data)
  277 
  278         properties = data.get("properties", {})
  279         if properties is None:
! 280             raise ValueError("properties is required")
  281 
  282         match type:
  283             case ToolServerType.remote_mcp:
  284                 # Validate headers

Lines 309-317

  309             case ToolServerType.kiln_task:
  310                 pass
  311 
  312             case _:
! 313                 raise_exhaustive_enum_error(type)
  314 
  315         return data
  316 
  317     def get_secret_keys(self) -> list[str]:

libs/core/kiln_ai/datamodel/tool_id.py

Lines 73-81

  73     # Kiln task tools must have format: kiln_task::<server_id>
  74     if id.startswith(KILN_TASK_TOOL_ID_PREFIX):
  75         server_id = kiln_task_server_id_from_tool_id(id)
  76         if not server_id:
! 77             raise ValueError(
  78                 f"Invalid Kiln task tool ID: {id}. Expected format: 'kiln_task::<server_id>'."
  79             )
  80         return id

libs/core/kiln_ai/tools/mcp_session_manager.py

Lines 194-202

  194                 # Read stderr content from temporary file for debugging
  195                 err_log.seek(0)  # Read from the start of the file
  196                 stderr_content = err_log.read()
  197                 if stderr_content:
! 198                     logger.error(
  199                         f"MCP server '{tool_server.name}' stderr output: {stderr_content}"
  200                     )
  201 
  202                 # Check for MCP errors. Things like wrong arguments would fall here.

Lines 213-221

  213         """
  214         error_msg = f"'{e}'"
  215 
  216         if stderr:
! 217             error_msg += f"\nMCP server error: {stderr}"
  218 
  219         error_msg += f"\n{LOCAL_MCP_ERROR_INSTRUCTION}"
  220 
  221         raise RuntimeError(error_msg) from e

libs/core/kiln_ai/utils/filesystem.py

Lines 4-15

   4 from pathlib import Path
   5 
   6 
   7 def open_folder(path: str | Path) -> None:
!  8     dir = os.path.dirname(path)
   9     if sys.platform.startswith("darwin"):
! 10         subprocess.run(["open", dir], check=True)
  11     elif sys.platform.startswith("win"):
! 12         os.startfile(dir)  # type: ignore[attr-defined]
  13     else:
! 14         subprocess.run(["xdg-open", dir], check=True)

libs/server/kiln_server/server.py

Lines 16-25

  16 def _get_version() -> str:
  17     """Get the version of the kiln-server package."""
  18     try:
  19         return version("kiln-server")
! 20     except Exception:
! 21         return "unknown"
  22 
  23 
  24 def make_app(lifespan=None):
  25     app = FastAPI(


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.

4 participants