Skip to content

Containerize coreason-optimizer as an Optimization Microservice#50

Merged
AdarshaAP merged 5 commits into
commit01from
feat/optimizer-microservice-9642741905693359806
Jan 29, 2026
Merged

Containerize coreason-optimizer as an Optimization Microservice#50
AdarshaAP merged 5 commits into
commit01from
feat/optimizer-microservice-9642741905693359806

Conversation

@gowthamrao
Copy link
Copy Markdown
Contributor

Implements the server mode for coreason-optimizer using FastAPI.
This allows the optimizer to run as a microservice accepting JSON payloads.
Includes:

  • Dependency updates (fastapi, uvicorn)
  • New server schemas (server_schemas.py)
  • Server implementation (server.py) with DynamicConstruct adapter and BridgedLLMClient/BridgedEmbeddingProvider to support synchronous strategies with async clients.
  • Dockerfile update to launch the server.
  • Comprehensive tests for the new server endpoints.

PR created automatically by Jules for task 9642741905693359806 started by @gowthamrao

- Add fastapi and uvicorn dependencies
- Define AgentDefinition and OptimizationRequest schemas
- Implement server.py with DynamicConstruct adapter and Bridged clients
- Update Dockerfile to run uvicorn
- Add server tests

Co-authored-by: gowthamrao <13936600+gowthamrao@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules Bot and others added 3 commits January 29, 2026 08:52
- Add fastapi and uvicorn dependencies
- Define AgentDefinition and OptimizationRequest schemas
- Implement server.py with DynamicConstruct adapter and Bridged clients
- Update Dockerfile to run uvicorn
- Add server tests
- Fix linting and typing issues in server code

Co-authored-by: gowthamrao <13936600+gowthamrao@users.noreply.github.com>
…mentation

- Fix `B904` linting errors in `server.py` by adding `from e`.
- Fix Mypy `no-any-return` errors in `server.py` using `cast`.
- Fix Mypy errors in `tests/test_server_basic.py` (return types, indexing).
- Add `test_optimize_semantic_success` to improve coverage of the semantic selector path in `server.py`.
- Apply code formatting via `ruff`.
- Achieve 100% test coverage.

Co-authored-by: gowthamrao <13936600+gowthamrao@users.noreply.github.com>
- Add fastapi and uvicorn dependencies
- Define AgentDefinition and OptimizationRequest schemas
- Implement server.py with DynamicConstruct adapter and Bridged clients
- Update Dockerfile to run uvicorn
- Add server tests
- Fix linting and typing issues in server code (B904, Mypy)
- Apply ruff formatting and sorting imports

Co-authored-by: gowthamrao <13936600+gowthamrao@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

- Bump version in pyproject.toml to 0.3.0
- Add fastapi and uvicorn to requirements.txt
- Create docs/requirements.md
- Create docs/usage.md documenting Server Mode
- Update README.md to feature Microservice capabilities

Co-authored-by: gowthamrao <13936600+gowthamrao@users.noreply.github.com>
@AdarshaAP AdarshaAP merged commit e1d1fe1 into commit01 Jan 29, 2026
10 checks passed
@AdarshaAP AdarshaAP deleted the feat/optimizer-microservice-9642741905693359806 branch January 29, 2026 11:39
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