Skip to content

fix(evaluators): configure Luna scorer API URL#237

Merged
abhinav-galileo merged 9 commits into
mainfrom
abhi/luna-internal-api-url
Jun 17, 2026
Merged

fix(evaluators): configure Luna scorer API URL#237
abhinav-galileo merged 9 commits into
mainfrom
abhi/luna-internal-api-url

Conversation

@abhinav-galileo

@abhinav-galileo abhinav-galileo commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Prefer optional GALILEO_LUNA_API_URL before GALILEO_API_URL for scorer API calls.
  • Infer auth from exactly one configured credential; keep legacy GALILEO_LUNA_AUTH_MODE supported but undocumented.
  • Emit a log warning when the deprecated auth-mode env var is used.
  • Support optional CA verification and bounded HTTP connection pooling.
  • Clarify examples: OSS users provide an API key; deployment-managed internal auth settings are injected by the deployment.

Validation

  • uv run ruff check evaluators/contrib/galileo/src/agent_control_evaluator_galileo/luna/client.py evaluators/contrib/galileo/tests/test_luna_evaluator.py
  • env PYTHONPATH=evaluators/contrib/galileo/src:evaluators/builtin/src:models/src uv run pytest evaluators/contrib/galileo/tests/test_luna_evaluator.py::TestGalileoLunaClient::test_client_warns_when_deprecated_auth_mode_env_is_set
  • Local route introspection confirms /api/v1/agents/initAgent and /api/v1/agents/{agent_name} are registered under CI DB env.

GitHub CI currently has one red ci job in server/tests/test_init_agent.py::test_init_agent_route_exists; rerun reproduced it. That server assertion is outside this PR diff.

@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.42857% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...src/agent_control_evaluator_galileo/luna/client.py 96.42% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@abhinav-galileo abhinav-galileo changed the title fix(evaluator-galileo): prefer cluster API URL for internal Luna auth fix(evaluator-galileo): use internal API URL for Luna auth Jun 11, 2026
@abhinav-galileo abhinav-galileo changed the title fix(evaluator-galileo): use internal API URL for Luna auth fix(evaluators): use internal API URL for Luna auth Jun 11, 2026
@abhinav-galileo abhinav-galileo changed the title fix(evaluators): use internal API URL for Luna auth fix(evaluators): add Luna API URL override Jun 11, 2026
@abhinav-galileo abhinav-galileo marked this pull request as ready for review June 11, 2026 17:23
Comment thread evaluators/contrib/galileo/src/agent_control_evaluator_galileo/luna/client.py Outdated
@abhinav-galileo abhinav-galileo marked this pull request as draft June 12, 2026 18:41
@abhinav-galileo abhinav-galileo changed the title fix(evaluators): add Luna API URL override fix(evaluators): configure Luna scorer API URL Jun 15, 2026
@abhinav-galileo abhinav-galileo marked this pull request as ready for review June 15, 2026 15:35
- Verify TLS against an optional CA bundle (ca_file arg or GALILEO_LUNA_CA_FILE) so internal API endpoints with internally-issued certificates work in internal auth mode.
- Bound connection pooling (keepalive expiry 1s, connection limits) so requests do not reuse sockets the server already closed, and retry the idempotent scorer invoke once on connection errors.
- Deprecate GALILEO_LUNA_AUTH_MODE; the auth mode is inferred from the configured credential, and setting both credentials remains an explicit error.
- Trim whitespace when resolving API base URLs from the environment.
- Update the Luna example README and cover URL precedence, TLS, retry, and deprecation with tests.
@abhinav-galileo abhinav-galileo force-pushed the abhi/luna-internal-api-url branch from 44185bb to 1a18fcc Compare June 17, 2026 12:12
@abhinav-galileo abhinav-galileo merged commit fc516f0 into main Jun 17, 2026
6 checks passed
@abhinav-galileo abhinav-galileo deleted the abhi/luna-internal-api-url branch June 17, 2026 12:31
galileo-automation pushed a commit that referenced this pull request Jun 17, 2026
## [3.1.0](ts-sdk-v3.0.0...ts-sdk-v3.1.0) (2026-06-17)

### Features

* **engine:** add evaluation runtime tuning ([#239](#239)) ([2f1e5fe](2f1e5fe))
* **server:** bound database connection pool ([#236](#236)) ([80aea8f](80aea8f))

### Bug Fixes

* **evaluators:** configure Luna scorer API URL ([#237](#237)) ([fc516f0](fc516f0))
* **server:** use plain psycopg with OS libpq ([#241](#241)) ([45a33a5](45a33a5))
@galileo-automation

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 3.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants