Skip to content

1.将python镜像升级到python:3.13-slim#592

Closed
ssiagu wants to merge 1 commit intocoleam00:mainfrom
ssiagu:dev
Closed

1.将python镜像升级到python:3.13-slim#592
ssiagu wants to merge 1 commit intocoleam00:mainfrom
ssiagu:dev

Conversation

@ssiagu
Copy link
Copy Markdown

@ssiagu ssiagu commented Sep 5, 2025

2.将ollama设置为自定义提供商。API_key复用open ai的。

Pull Request

Summary

Changes Made

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Code refactoring

Affected Services

  • Frontend (React UI)
  • Server (FastAPI backend)
  • MCP Server (Model Context Protocol)
  • Agents (PydanticAI service)
  • Database (migrations/schema)
  • Docker/Infrastructure
  • Documentation site

Testing

  • All existing tests pass
  • Added new tests for new functionality
  • Manually tested affected user flows
  • Docker builds succeed for all services

Test Evidence

# Example: python -m pytest tests/
# Example: cd archon-ui-main && npm run test

Checklist

  • My code follows the service architecture patterns
  • If using an AI coding assistant, I used the CLAUDE.md rules
  • I have added tests that prove my fix/feature works
  • All new and existing tests pass locally
  • My changes generate no new warnings
  • I have updated relevant documentation
  • I have verified no regressions in existing features

Breaking Changes

Additional Notes

Summary by CodeRabbit

  • Chores

    • Upgraded Docker base images to Python 3.13 for agents, MCP, and server, aligning environments and ensuring compatibility with the latest Python runtime.
  • Bug Fixes

    • Improved Ollama provider authentication handling to use a configured API key when available, reducing setup friction and preventing connection issues.

2.将ollama设置为自定义提供商。API_key复用open ai的。
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Sep 5, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Base Python images in Dockerfiles were upgraded to 3.13. Credential lookup now maps the Ollama provider to OPENAI_API_KEY. The Ollama client initialization passes a dynamic API key instead of a fixed "ollama" string. No public interfaces changed.

Changes

Cohort / File(s) Change Summary
Python base image bump to 3.13
python/Dockerfile.agents, python/Dockerfile.mcp, python/Dockerfile.server
Updated base images from Python 3.12 to 3.13-slim (both builder and runtime where applicable). No other Docker steps changed.
Ollama API key retrieval and client init
python/src/server/services/credential_service.py, python/src/server/services/llm_provider_service.py
CredentialService now maps "ollama" to OPENAI_API_KEY. LLMProviderService passes the resolved api_key to openai.AsyncOpenAI for Ollama instead of a fixed "ollama" string. Comments updated.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant S as Server
  participant CS as CredentialService
  participant ENV as Env Vars
  participant LPS as LLMProviderService
  participant OA as OpenAI Async Client (Ollama base_url)

  S->>CS: _get_provider_api_key(provider="ollama")
  CS->>ENV: Read OPENAI_API_KEY
  ENV-->>CS: api_key (may be empty)
  CS-->>S: api_key

  S->>LPS: get_llm_client(provider="ollama", api_key)
  LPS->>OA: new AsyncOpenAI(base_url=ollama_url, api_key=api_key)
  OA-->>LPS: client instance
  LPS-->>S: ollama client
  note over LPS,OA: If api_key absent, client may proceed with dummy/no key per config
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

A hop, a skip—versions climb the vine,
From 3.12 to 3.13, the images align.
Ollama now borrows the OpenAI key,
Credentials tidy as carrots can be.
Thump-thump! The build runs clean and spry—
A happy hare beneath the CI sky. 🥕🐇


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between e74d613 and 04cefaf.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • python/Dockerfile.agents (1 hunks)
  • python/Dockerfile.mcp (1 hunks)
  • python/Dockerfile.server (2 hunks)
  • python/src/server/services/credential_service.py (1 hunks)
  • python/src/server/services/llm_provider_service.py (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ssiagu ssiagu closed this Sep 5, 2025
coleam00 pushed a commit that referenced this pull request Apr 7, 2026
* Fix: extractOwnerRepo silently produces 'undefined' path segments (#586)

When repoPath has fewer than 2 non-empty segments (e.g. /repo), both
the inline extraction in createWorktreeForIssue and the private method
in WorktreeProvider silently returned undefined for the owner segment,
causing path.join() to produce paths like <base>/undefined/<repo>/<branch>.

Changes:
- Add exported extractOwnerRepo() to @archon/git with parts.length < 2 guard
- Use extractOwnerRepo() in createWorktreeForIssue (replaces inline logic)
- Export extractOwnerRepo from @archon/git index
- Delegate WorktreeProvider.extractOwnerRepo() to the shared @archon/git function
- Add tests for the error path in both @archon/git and @archon/isolation

Fixes #586

* fix: address review findings from PR #592

- Use toRepoPath() / RepoPath casts in extractOwnerRepo tests for type consistency
- Add boundary test for exactly-2-segment path in extractOwnerRepo
- Add Windows-style path test for extractOwnerRepo
- Add 'cannot extract owner/repo' pattern to classifyIsolationError for cleaner user messages
Tyone88 pushed a commit to Tyone88/Archon that referenced this pull request Apr 16, 2026
…leam00#592)

* Fix: extractOwnerRepo silently produces 'undefined' path segments (coleam00#586)

When repoPath has fewer than 2 non-empty segments (e.g. /repo), both
the inline extraction in createWorktreeForIssue and the private method
in WorktreeProvider silently returned undefined for the owner segment,
causing path.join() to produce paths like <base>/undefined/<repo>/<branch>.

Changes:
- Add exported extractOwnerRepo() to @archon/git with parts.length < 2 guard
- Use extractOwnerRepo() in createWorktreeForIssue (replaces inline logic)
- Export extractOwnerRepo from @archon/git index
- Delegate WorktreeProvider.extractOwnerRepo() to the shared @archon/git function
- Add tests for the error path in both @archon/git and @archon/isolation

Fixes coleam00#586

* fix: address review findings from PR coleam00#592

- Use toRepoPath() / RepoPath casts in extractOwnerRepo tests for type consistency
- Add boundary test for exactly-2-segment path in extractOwnerRepo
- Add Windows-style path test for extractOwnerRepo
- Add 'cannot extract owner/repo' pattern to classifyIsolationError for cleaner user messages
joaobmonteiro pushed a commit to joaobmonteiro/Archon that referenced this pull request Apr 26, 2026
…leam00#592)

* Fix: extractOwnerRepo silently produces 'undefined' path segments (coleam00#586)

When repoPath has fewer than 2 non-empty segments (e.g. /repo), both
the inline extraction in createWorktreeForIssue and the private method
in WorktreeProvider silently returned undefined for the owner segment,
causing path.join() to produce paths like <base>/undefined/<repo>/<branch>.

Changes:
- Add exported extractOwnerRepo() to @archon/git with parts.length < 2 guard
- Use extractOwnerRepo() in createWorktreeForIssue (replaces inline logic)
- Export extractOwnerRepo from @archon/git index
- Delegate WorktreeProvider.extractOwnerRepo() to the shared @archon/git function
- Add tests for the error path in both @archon/git and @archon/isolation

Fixes coleam00#586

* fix: address review findings from PR coleam00#592

- Use toRepoPath() / RepoPath casts in extractOwnerRepo tests for type consistency
- Add boundary test for exactly-2-segment path in extractOwnerRepo
- Add Windows-style path test for extractOwnerRepo
- Add 'cannot extract owner/repo' pattern to classifyIsolationError for cleaner user messages
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.

1 participant