Skip to content

docs: add CLAUDE.md project guidance#15

Merged
OriNachum merged 2 commits into
mainfrom
docs/add-claude-md
Apr 3, 2026
Merged

docs: add CLAUDE.md project guidance#15
OriNachum merged 2 commits into
mainfrom
docs/add-claude-md

Conversation

@OriNachum

Copy link
Copy Markdown
Contributor

Summary

  • Adds CLAUDE.md to the repo root so Claude Code sessions have project context (architecture, commands, test markers, CI info)
  • This file was previously local-only and not tracked in git

Test plan

  • File committed and pushed

  • Verify CLAUDE.md renders correctly on GitHub

  • Confirm CI passes (no code changes)

  • Claude

Provides architecture overview, test commands, CI markers, and
contributor workflow so Claude Code sessions start with full context.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 3, 2026 04:58
@qodo-code-review

Copy link
Copy Markdown

Review Summary by Qodo

Add CLAUDE.md project guidance for Claude Code sessions

📝 Documentation

Grey Divider

Walkthroughs

Description
• Adds CLAUDE.md with comprehensive project guidance
• Documents architecture, request flow, and service layers
• Includes test commands, markers, and CI workflow info
• Provides configuration and new model integration steps
Diagram
flowchart LR
  A["CLAUDE.md Added"] --> B["Project Overview"]
  A --> C["Architecture Guide"]
  A --> D["Commands Reference"]
  A --> E["Test Markers"]
  A --> F["CI/Config Info"]
  C --> G["Request Flow"]
  C --> H["Service Layers"]
  C --> I["Model Integration"]
Loading

Grey Divider

File Changes

1. CLAUDE.md 📝 Documentation +84/-0

Comprehensive Claude Code project guidance document

• New documentation file providing Claude Code session context
• Includes project overview, architecture, and request flow details
• Documents all test commands, pytest markers, and CI workflow
• Provides configuration variables and new model integration steps

CLAUDE.md


Grey Divider

Qodo Logo

@qodo-code-review

qodo-code-review Bot commented Apr 3, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX Issues (0)

Grey Divider


Action required

1. Wrong config mechanism🐞 Bug ≡ Correctness
Description
CLAUDE.md claims config_loader uses pydantic-settings, but the implementation uses python-dotenv +
os.getenv (custom AppConfig), so readers will follow the wrong pattern when updating
configuration.
Code

CLAUDE.md[59]

+- **`utils/`** — `RequestFormatDetector` (auto-detects input format), `config_loader` (env-based config via pydantic-settings), `knowledge_base_detector`.
Evidence
CLAUDE.md explicitly states config_loader is “env-based config via pydantic-settings”, but the
actual config loader imports dotenv.load_dotenv and reads settings via os.getenv in a
hand-rolled AppConfig class; there is no pydantic-settings usage in the implementation.

CLAUDE.md[59-59]
CLAUDE.md[84-84]
src/open_bedrock_server/utils/config_loader.py[1-25]
src/open_bedrock_server/utils/config_loader.py[27-100]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`CLAUDE.md` states configuration is handled via **pydantic-settings**, but the repo’s actual configuration implementation is a custom `AppConfig` that loads `.env` via `python-dotenv` and reads values using `os.getenv`. This mismatch will mislead contributors.

### Issue Context
- Current implementation: `src/open_bedrock_server/utils/config_loader.py` uses `dotenv.load_dotenv(...)` + `os.getenv(...)`.
- `CLAUDE.md` mentions pydantic-settings in multiple places.

### Fix Focus Areas
- CLAUDE.md[59-59]
- CLAUDE.md[84-84]

### Suggested fix
- Replace “via pydantic-settings” with wording that matches reality (e.g., “env-based config via python-dotenv + `AppConfig` (`os.getenv`)”).
- If pydantic-settings is intended long-term, either implement it in `config_loader` or clarify it is a dependency but not currently used.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Nonexistent env var🐞 Bug ≡ Correctness
Description
CLAUDE.md documents DEFAULT_OPENAI_MODEL as a key environment variable, but the code does not read
it and OpenAI model selection comes from request.model, so setting it has no effect.
Code

CLAUDE.md[84]

+Uses `.env` file with pydantic-settings. Key vars: `API_KEY` (server auth), `OPENAI_API_KEY`, AWS credentials (`AWS_PROFILE`/`AWS_ACCESS_KEY_ID`+`AWS_SECRET_ACCESS_KEY`/`AWS_ROLE_ARN`), `AWS_REGION`, `S3_FILES_BUCKET` (for file query feature), `DEFAULT_OPENAI_MODEL`.
Evidence
The config loader enumerates supported env vars and does not include DEFAULT_OPENAI_MODEL.
Separately, OpenAI requests pass model_id=request.model, indicating the model is taken from the
incoming request rather than any default-model env var.

CLAUDE.md[84-84]
src/open_bedrock_server/utils/config_loader.py[56-114]
src/open_bedrock_server/services/openai_service.py[244-265]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`CLAUDE.md` lists `DEFAULT_OPENAI_MODEL` as a key configuration variable, but the server code does not read it. This creates a false knob for operators/contributors.

### Issue Context
- `src/open_bedrock_server/utils/config_loader.py` does not load `DEFAULT_OPENAI_MODEL`.
- `OpenAIService.chat_completion_with_request()` forwards `model_id=request.model`.

### Fix Focus Areas
- CLAUDE.md[84-84]

### Suggested fix options
1) **Documentation-only (recommended):** Remove `DEFAULT_OPENAI_MODEL` from CLAUDE.md, and clarify that the model is selected per-request via the `model` field.
2) **Feature implementation:** Add `DEFAULT_OPENAI_MODEL` support in config and request handling (e.g., when request.model is missing/empty, fall back to configured default), and ensure tests/docs reflect the behavior.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Comment thread CLAUDE.md Outdated
Comment thread CLAUDE.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a repo-root CLAUDE.md intended to give Claude Code sessions consistent project context (architecture, common commands, test markers, CI/config notes) for the Open Bedrock Server codebase.

Changes:

  • Introduces CLAUDE.md with quick-start commands for setup, testing, linting, and running the CLI/server.
  • Documents high-level architecture (routing, adapters/strategies, services) and guidance for adding new Bedrock model families.
  • Summarizes pytest markers and CI workflows/configuration expectations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CLAUDE.md Outdated
Comment thread CLAUDE.md Outdated
Comment thread CLAUDE.md Outdated
Comment thread CLAUDE.md Outdated
Comment thread CLAUDE.md Outdated
Comment thread CLAUDE.md Outdated
- Clarify primary endpoint vs additional routes
- Prefix lint commands with uv run
- Fix BedrockAdapterStrategyABC → BedrockAdapterStrategy
- Fix pydantic-settings → python-dotenv/os.getenv
- Remove nonexistent DEFAULT_OPENAI_MODEL env var

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@OriNachum OriNachum merged commit 05a425b into main Apr 3, 2026
4 checks passed
@OriNachum OriNachum deleted the docs/add-claude-md branch April 3, 2026 05:11
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