mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
Three private tiles published to the codeflash workspace: - codeflash-internal-rules: 6 eager rules (code-style, architecture, optimization-patterns, git-conventions, testing-rules, multi-language-handlers) - codeflash-internal-docs: 8 lazy doc pages (domain-types, optimization-pipeline, test-generation-pipeline, context-extraction, aiservice/cf-api endpoints, configuration-thresholds, llm-provider-abstraction) - codeflash-internal-skills: 4 on-demand skills (debug-optimization-failure, add-language-support, add-api-endpoint, debug-test-generation)
1.9 KiB
1.9 KiB
Configuration & Thresholds
Key constants and configuration values used across the optimization pipeline.
Model Distribution (core/shared/optimizer_config.py)
MAX_OPTIMIZER_CALLS = 6— maximum parallel optimization callsMAX_OPTIMIZER_LP_CALLS = 7— maximum line profiler optimization calls- Distribution formula:
claude_calls = (total - 1) // 2,gpt_calls = total - claude_calls - Example: 6 total → 4 OpenAI + 2 Anthropic
Default Request Values
OptimizeSchema.n_candidates = 5— default optimization candidatesOptimizeSchemaLP.n_candidates = 6— default line profiler candidatesOptimizeSchema.language = "python"— default language
LLM Model Costs (USD per 1M tokens)
| Model | Input | Cached Input | Output |
|---|---|---|---|
| GPT-4.1 | $2.00 | $0.50 | $8.00 |
| GPT-5-mini | $0.25 | $0.03 | $2.00 |
| Claude Sonnet 4.5 | $3.00 | — | $15.00 |
| Claude Haiku 4.5 | $1.00 | — | $5.00 |
Model Assignments
| Purpose | Primary | Fallback |
|---|---|---|
| Optimization | GPT-5-mini | Claude Sonnet 4.5 |
| Explanation | GPT-5-mini | Claude Sonnet 4.5 |
| Planning | GPT-5-mini | Claude Sonnet 4.5 |
| Execution | GPT-5-mini | Claude Sonnet 4.5 |
| Ranking | GPT-5-mini | Claude Sonnet 4.5 |
| Refinement | Claude Sonnet 4.5 | GPT-5-mini |
| Code Repair | Claude Sonnet 4.5 | GPT-5-mini |
| Explanations | Claude Sonnet 4.5 | GPT-5-mini |
| Optimization Review | Claude Sonnet 4.5 | GPT-5-mini |
| Adaptive Optimize | Claude Sonnet 4.5 | GPT-5-mini |
| Cost-effective (testgen) | Claude Haiku 4.5 | GPT-5-mini |
Ruff Configuration (pyproject.toml)
line-length = 120select = ["ALL"]with specific ignores (seetool.ruff.lint.ignore)fix = true,show-fixes = true- Runtime-evaluated base classes:
pydantic.BaseModel,ninja.Schema,typing.TypedDict - Excluded paths:
core/languages/python/testgen/tests,core/languages/python/testgen/sqlalchemy