diff --git a/packages/ai/README.md b/packages/ai/README.md index b1b47a7..355dcdc 100644 --- a/packages/ai/README.md +++ b/packages/ai/README.md @@ -73,7 +73,7 @@ result = await evals.run( ) ``` -`LD_API_TOKEN` is required. Configure `LD_SDK_KEY` — or initialize your own client with `init_client(client=...)` — to emit one `$ld:ai:offline-evals:generation` event per generated row, plus one `$ld:ai:offline-evals:criterion` event per `(row, criterion)` when `criteria` are supplied, through the standard SDK event transport. The SDK reports scores; LaunchDarkly rules on them at ingest. A judge served by a different provider than `generation` needs a handler for it in `judge_handlers`. Use `LD_API_BASE_URI` for staging or local management API traffic; it is separate from the SDK delivery setting `LD_BASE_URI`. Evaluation-run links use the explicit `ui_base_uri` option or `LD_UI_BASE_URI` (for example, `https://ld-stg.launchdarkly.com` in staging), defaulting to `https://app.launchdarkly.com`. See the [core evaluations guide](../client/README.md#run-an-evaluation-from-code). +`LD_API_TOKEN` is required. Configure `LD_SDK_KEY` — or initialize your own client with `init_client(client=...)` — to emit one `$ld:ai:offline-evals:generation` event per generated row, plus one `$ld:ai:offline-evals:criterion` event per `(row, criterion)` when `criteria` are supplied, through the standard SDK event transport. The SDK reports scores; LaunchDarkly rules on them at ingest. A judge served by a different provider than `generation` needs a handler for it in `judge_handlers`. Use `LD_API_BASE_URI` for staging or local management API traffic; it is separate from the SDK delivery setting `LD_BASE_URI`. Evaluation-run links use the explicit `ui_base_uri` option or `LD_UI_BASE_URI`, defaulting to `https://app.launchdarkly.com`; set it when the project is not in production, or a run created elsewhere still links to the production app. See the [core evaluations guide](../client/README.md#run-an-evaluation-from-code). --- diff --git a/packages/client/README.md b/packages/client/README.md index 1e50a5e..66a3924 100644 --- a/packages/client/README.md +++ b/packages/client/README.md @@ -42,7 +42,7 @@ No code changes are required — `init_client()` detects the packages at runtime | `LD_API_TOKEN` | For evaluations | API access token used by the evaluations management API | | `LD_SDK_KEY` | For evaluations | SDK key whose event transport carries generation results to LaunchDarkly | | `LD_API_BASE_URI` | No | Evaluations management API host override; intentionally separate from `LD_BASE_URI` | -| `LD_UI_BASE_URI` | No | LaunchDarkly application host for evaluation-run links (default: `https://app.launchdarkly.com`; staging: `https://ld-stg.launchdarkly.com`) | +| `LD_UI_BASE_URI` | No | LaunchDarkly application host for evaluation-run links (default: `https://app.launchdarkly.com`). Set it for a non-production project, or its runs still link to the production app | ### Run an evaluation from code diff --git a/packages/client/tests/test_evaluations.py b/packages/client/tests/test_evaluations.py index 57edf18..0a4ce0e 100644 --- a/packages/client/tests/test_evaluations.py +++ b/packages/client/tests/test_evaluations.py @@ -180,7 +180,7 @@ def test_ui_base_uri_precedence_and_api_base_isolation( monkeypatch.setenv("LD_API_TOKEN", "api-token") monkeypatch.setenv("LD_SDK_KEY", "sdk-key") monkeypatch.setenv("LD_API_BASE_URI", "https://api.staging.example.com") - monkeypatch.setenv("LD_UI_BASE_URI", "https://ld-stg.launchdarkly.com/") + monkeypatch.setenv("LD_UI_BASE_URI", "https://ui.staging.example.com/") from_env = init_evaluations(transport=RecordingTransport()) explicit = init_evaluations( @@ -188,7 +188,7 @@ def test_ui_base_uri_precedence_and_api_base_isolation( ) assert from_env.api.base_uri == "https://api.staging.example.com" - assert from_env.ui_base_uri == "https://ld-stg.launchdarkly.com" + assert from_env.ui_base_uri == "https://ui.staging.example.com" assert explicit.ui_base_uri == "https://ui.example.com"