Skip to content

LCORE-1099: Feature/upgrade ogx to 1.0.2 - #2293

Open
asimurka wants to merge 30 commits into
lightspeed-core:mainfrom
asimurka:feature/upgrade-ogx-to-1.0.2
Open

LCORE-1099: Feature/upgrade ogx to 1.0.2#2293
asimurka wants to merge 30 commits into
lightspeed-core:mainfrom
asimurka:feature/upgrade-ogx-to-1.0.2

Conversation

@asimurka

@asimurka asimurka commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Description

Merge feature branch to main

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement
  • Benchmarks improvement

Tools used to create PR

Identify any AI code assistants used in this PR (for transparency and review context)

  • Assisted-by: Cursor

Related Tickets & Documents

  • Related Issue #
  • Closes #

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

asimurka and others added 28 commits July 30, 2026 13:16
Eliminates redundant stored state by deriving refusal_response from
message at access time, removing the now-unnecessary
create_refusal_response helper and all constructor-site arguments.
Introduce AbstractSafetyCapability(AbstractCapability[T]) in
capabilities/base.py, requiring subclasses to implement a run()
method that accepts raw text and returns ShieldModerationResult.
This enables safety capabilities to be invoked outside the
pydantic-ai agent lifecycle.

Migrate QuestionValidity and PiiRedactionCapability to extend the
new base class and implement run():

- QuestionValidity.run() delegates to model_request and maps
  ALLOWED/REJECTED to ShieldModerationPassed/Blocked
- PiiRedactionCapability.run() applies regex redaction and returns
  Blocked when PII is detected

Add unit tests for both run() implementations.
Rename shield config fields to identifier/provider_id, reshape CatalogShield
to type=shield with params, and align listing/tests with the new shape.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add run_shield_moderation_v2 and build_shield to utils/shields.py to
run shield moderation through AbstractSafetyCapability instances instead
of the Llama Stack client. Update the responses endpoint to call the new
function with shield configs directly. Include unit tests covering pass,
block, filtering, and error handling paths.
Move append_turn_to_conversation into utils.conversations so capabilities
no longer depend on utils.shields at import time.

Co-authored-by: Cursor <cursoragent@cursor.com>
@asimurka
asimurka force-pushed the feature/upgrade-ogx-to-1.0.2 branch from 3b4c686 to 5ec0bc9 Compare July 30, 2026 11:16
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 204 files, which is 104 over the limit of 100.

To get a review, narrow the scope:
• coderabbit review --committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 76ff03b3-cac1-4fb7-8d6b-d2b3be440ea1

📥 Commits

Reviewing files that changed from the base of the PR and between a709637 and 1b2140b.

⛔ Files ignored due to path filters (3)
  • tests/e2e/rag/kv_store.db is excluded by !**/*.db
  • tests/e2e/rag/pdf_kv_store.db is excluded by !**/*.db
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (204)
  • .konflux/requirements.hashes.source.txt
  • .konflux/requirements.hashes.wheel.txt
  • .tekton/lightspeed-stack-0-7-pull-request.yaml
  • .tekton/lightspeed-stack-0-7-push.yaml
  • AGENTS.md
  • Makefile
  • README.md
  • docker-compose-library.yaml
  • docker-compose.yaml
  • docs/README.md
  • docs/basic_info/overview.md
  • docs/design/conversation-compaction/conversation-compaction.md
  • docs/design/human-in-the-loop/human-in-the-loop.md
  • docs/design/llama-stack-config-merge/llama-stack-config-merge-spike.md
  • docs/design/llama-stack-config-merge/llama-stack-config-merge.md
  • docs/devel_doc/ARCHITECTURE.md
  • docs/devel_doc/openapi.json
  • docs/devel_doc/providers.md
  • docs/devel_doc/responses.md
  • docs/models/requests.md
  • docs/testing/e2e_scenarios.md
  • docs/testing/e2e_testing.md
  • docs/user_doc/a2a_protocol.md
  • docs/user_doc/config.md
  • docs/user_doc/shields_guide.md
  • examples/azure-run.yaml
  • examples/bedrock-run.yaml
  • examples/lightspeed-stack-shields.yaml
  • examples/profiles/inline-faiss.yaml
  • examples/profiles/openai-remote.yaml
  • examples/run.yaml
  • examples/vertexai-run.yaml
  • examples/vllm-rhaiis.yaml
  • examples/vllm-rhelai.yaml
  • examples/vllm-rhoai.yaml
  • examples/watsonx-run.yaml
  • pyproject.toml
  • run.yaml
  • scripts/generate_openapi_schema.py
  • scripts/llama-stack-entrypoint.sh
  • src/app/endpoints/a2a.py
  • src/app/endpoints/conversations_v1.py
  • src/app/endpoints/health.py
  • src/app/endpoints/info.py
  • src/app/endpoints/mcp_servers.py
  • src/app/endpoints/metrics.py
  • src/app/endpoints/models.py
  • src/app/endpoints/prompts.py
  • src/app/endpoints/providers.py
  • src/app/endpoints/query.py
  • src/app/endpoints/rags.py
  • src/app/endpoints/responses.py
  • src/app/endpoints/rlsapi_v1.py
  • src/app/endpoints/shields.py
  • src/app/endpoints/streaming_query.py
  • src/app/endpoints/tools.py
  • src/app/endpoints/vector_stores.py
  • src/app/main.py
  • src/client.py
  • src/configuration.py
  • src/constants.py
  • src/data/default_run.yaml
  • src/lightspeed_stack.py
  • src/llama_stack_configuration.py
  • src/log.py
  • src/metrics/utils.py
  • src/models/api/requests/query.py
  • src/models/api/requests/responses_openai.py
  • src/models/api/responses/error/service_unavailable.py
  • src/models/api/responses/successful/catalog.py
  • src/models/api/responses/successful/responses_openai.py
  • src/models/common/__init__.py
  • src/models/common/models.py
  • src/models/common/moderation.py
  • src/models/common/responses/contexts.py
  • src/models/common/responses/responses_api_params.py
  • src/models/common/responses/types.py
  • src/models/common/shields.py
  • src/models/common/tools.py
  • src/models/common/turn_summary.py
  • src/models/config.py
  • src/pydantic_ai_lightspeed/capabilities/base.py
  • src/pydantic_ai_lightspeed/capabilities/question_validity/_capability.py
  • src/pydantic_ai_lightspeed/capabilities/redaction/_capability.py
  • src/pydantic_ai_lightspeed/llamastack/__init__.py
  • src/pydantic_ai_lightspeed/llamastack/_model.py
  • src/pydantic_ai_lightspeed/llamastack/_provider.py
  • src/pydantic_ai_lightspeed/llamastack/_transport.py
  • src/utils/agents/error_handler.py
  • src/utils/agents/query.py
  • src/utils/agents/streaming.py
  • src/utils/builtin_tools.py
  • src/utils/common.py
  • src/utils/compaction.py
  • src/utils/conversation_compaction.py
  • src/utils/conversations.py
  • src/utils/endpoints.py
  • src/utils/llama_stack_version.py
  • src/utils/mcp_tools.py
  • src/utils/model_list.py
  • src/utils/models_dumper.py
  • src/utils/pydantic_ai_helpers.py
  • src/utils/query.py
  • src/utils/responses.py
  • src/utils/shields.py
  • src/utils/stream_interrupts.py
  • src/utils/tool_formatter.py
  • src/utils/types.py
  • src/utils/vector_search.py
  • tests/benchmarks/data/python_1000_lines.py
  • tests/benchmarks/data/python_100_lines.py
  • tests/benchmarks/data/python_10_lines.py
  • tests/configuration/minimal-stack.yaml
  • tests/configuration/run.yaml
  • tests/e2e-prow/rhoai/configs/run.yaml
  • tests/e2e-prow/rhoai/manifests/lightspeed/llama-stack-openai.yaml
  • tests/e2e-prow/rhoai/manifests/lightspeed/llama-stack-prow.yaml
  • tests/e2e-prow/rhoai/pipeline-konflux.sh
  • tests/e2e-prow/rhoai/pipeline.sh
  • tests/e2e/configs/run-azure.yaml
  • tests/e2e/configs/run-bedrock.yaml
  • tests/e2e/configs/run-ci.yaml
  • tests/e2e/configs/run-rhaiis.yaml
  • tests/e2e/configs/run-rhelai.yaml
  • tests/e2e/configs/run-vertexai.yaml
  • tests/e2e/configs/run-watsonx.yaml
  • tests/e2e/configuration/library-mode/lightspeed-stack.yaml
  • tests/e2e/configuration/server-mode/lightspeed-stack.yaml
  • tests/e2e/features/info.feature
  • tests/e2e/features/llama_stack_disrupted.feature
  • tests/e2e/features/mcp.feature
  • tests/e2e/features/query.feature
  • tests/e2e/features/skills.feature
  • tests/e2e/features/steps/common.py
  • tests/e2e/features/steps/info.py
  • tests/e2e/features/streaming_query.feature
  • tests/e2e/rag/README.md
  • tests/e2e/utils/README.md
  • tests/e2e/utils/llama_stack_utils.py
  • tests/e2e/utils/utils.py
  • tests/integration/README.md
  • tests/integration/conftest.py
  • tests/integration/endpoints/test_conversations_v1_integration.py
  • tests/integration/endpoints/test_health_integration.py
  • tests/integration/endpoints/test_info_integration.py
  • tests/integration/endpoints/test_model_list.py
  • tests/integration/endpoints/test_query_byok_integration.py
  • tests/integration/endpoints/test_query_integration.py
  • tests/integration/endpoints/test_responses_byok_integration.py
  • tests/integration/endpoints/test_responses_integration.py
  • tests/integration/endpoints/test_rlsapi_v1_integration.py
  • tests/integration/endpoints/test_root_endpoint.py
  • tests/integration/endpoints/test_streaming_query_byok_integration.py
  • tests/integration/endpoints/test_streaming_query_integration.py
  • tests/integration/endpoints/test_tools_integration.py
  • tests/integration/test_openapi_json.py
  • tests/unit/app/endpoints/test_a2a.py
  • tests/unit/app/endpoints/test_conversations.py
  • tests/unit/app/endpoints/test_health.py
  • tests/unit/app/endpoints/test_info.py
  • tests/unit/app/endpoints/test_mcp_servers.py
  • tests/unit/app/endpoints/test_models.py
  • tests/unit/app/endpoints/test_prompts.py
  • tests/unit/app/endpoints/test_providers.py
  • tests/unit/app/endpoints/test_query.py
  • tests/unit/app/endpoints/test_rags.py
  • tests/unit/app/endpoints/test_responses.py
  • tests/unit/app/endpoints/test_responses_splunk.py
  • tests/unit/app/endpoints/test_rlsapi_v1.py
  • tests/unit/app/endpoints/test_shields.py
  • tests/unit/app/endpoints/test_streaming_query.py
  • tests/unit/app/endpoints/test_tools.py
  • tests/unit/app/endpoints/test_vector_stores.py
  • tests/unit/conftest.py
  • tests/unit/metrics/test_utis.py
  • tests/unit/models/config/test_dump_configuration.py
  • tests/unit/models/config/test_llama_stack_configuration.py
  • tests/unit/models/config/test_shields_configuration.py
  • tests/unit/models/responses/test_error_responses.py
  • tests/unit/models/responses/test_successful_responses.py
  • tests/unit/pydantic_ai_lightspeed/capabilities/question_validity/test_capability.py
  • tests/unit/pydantic_ai_lightspeed/capabilities/redaction/test_capability.py
  • tests/unit/pydantic_ai_lightspeed/llamastack/test_model.py
  • tests/unit/pydantic_ai_lightspeed/llamastack/test_provider.py
  • tests/unit/pydantic_ai_lightspeed/llamastack/test_transport.py
  • tests/unit/test_client.py
  • tests/unit/test_configuration.py
  • tests/unit/test_llama_stack_synthesize.py
  • tests/unit/utils/agents/test_query.py
  • tests/unit/utils/agents/test_streaming.py
  • tests/unit/utils/test_builtin_tools.py
  • tests/unit/utils/test_common.py
  • tests/unit/utils/test_conversation_compaction.py
  • tests/unit/utils/test_conversations.py
  • tests/unit/utils/test_endpoints.py
  • tests/unit/utils/test_llama_stack_version.py
  • tests/unit/utils/test_mcp_tools.py
  • tests/unit/utils/test_model_list.py
  • tests/unit/utils/test_models_dumper.py
  • tests/unit/utils/test_pydantic_ai.py
  • tests/unit/utils/test_query.py
  • tests/unit/utils/test_responses.py
  • tests/unit/utils/test_shields.py
  • tests/unit/utils/test_types.py

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tisnik tisnik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@tisnik
tisnik requested a review from jrobertboos July 30, 2026 13:08

@jrobertboos jrobertboos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

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.

4 participants