Skip to content

Conversation

@tofarr
Copy link
Collaborator

@tofarr tofarr commented Dec 31, 2025

Summary

Refactors DiscriminatedUnionMixin to work correctly with Pydantic's C bindings by leveraging Pydantic's native mechanisms instead of fighting against them.

Key Changes

Architecture Simplification

  • kind is now a @computed_field - Returns class name dynamically instead of being a mutable field that gets patched after construction
  • Custom @model_validator and @model_serializer - Handle polymorphic validation/serialization through Pydantic's supported hooks
  • Custom __get_pydantic_json_schema__ - Generates proper oneOf schemas for abstract base classes
  • Removed model_rebuild() hackery - No longer bypasses Pydantic's complete_model_class() or patches model_fields post-construction
  • Removed FastAPI monkey-patch - No longer needed since we work with Pydantic rather than against it

Code Quality Improvements

  • Thread-safe schema cache - Uses threading.local() instead of global dict for _schemas_in_progress
  • Deprecated OpenHandsModel - No longer required; new code should extend BaseModel directly
  • Cleaner error messages - Standardized format: Unknown kind 'X' for module.Class; Expected one of: [...]
  • Exclude computed fields from MCP/tool schemas - Updated model_computed_fields.keys() exclusion in mcp/tool.py and tool/schema.py

What Was Removed (~250 lines)

  • _rebuild_required global flag and rebuild_all() function
  • _create_enhanced_discriminated_union_error_message() and related helpers
  • _patch_fastapi_discriminated_union_support() and _extract_discriminated_unions()
  • Direct assignment to __pydantic_core_schema__, __pydantic_validator__, __pydantic_serializer__

Backward Compatibility

  • OpenHandsModel still exists (as empty shell) for external code that extends it
  • kind field behavior unchanged from consumer perspective
  • Serialization/deserialization of polymorphic hierarchies works identically
  • JSON schema output structure preserved

Checklist

  • All discriminated union tests pass
  • All SDK tests pass
  • Pre-commit hooks pass (pyright, ruff, etc.)
  • No public API changes requiring documentation updates

Agent Server images for this PR

GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server

Variants & Base Images

Variant Architectures Base Image Docs / Tags
java amd64, arm64 eclipse-temurin:17-jdk Link
python amd64, arm64 nikolaik/python-nodejs:python3.12-nodejs22 Link
golang amd64, arm64 golang:1.21-bookworm Link

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:5e92f01-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-5e92f01-python \
  ghcr.io/openhands/agent-server:5e92f01-python

All tags pushed for this build

ghcr.io/openhands/agent-server:5e92f01-golang-amd64
ghcr.io/openhands/agent-server:5e92f01-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:5e92f01-golang-arm64
ghcr.io/openhands/agent-server:5e92f01-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:5e92f01-java-amd64
ghcr.io/openhands/agent-server:5e92f01-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:5e92f01-java-arm64
ghcr.io/openhands/agent-server:5e92f01-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:5e92f01-python-amd64
ghcr.io/openhands/agent-server:5e92f01-nikolaik_s_python-nodejs_tag_python3.12-nodejs22-amd64
ghcr.io/openhands/agent-server:5e92f01-python-arm64
ghcr.io/openhands/agent-server:5e92f01-nikolaik_s_python-nodejs_tag_python3.12-nodejs22-arm64
ghcr.io/openhands/agent-server:5e92f01-golang
ghcr.io/openhands/agent-server:5e92f01-java
ghcr.io/openhands/agent-server:5e92f01-python

About Multi-Architecture Support

  • Each variant tag (e.g., 5e92f01-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., 5e92f01-python-amd64) are also available if needed

openhands-agent and others added 2 commits December 31, 2025 03:33
This commit fixes issues with DiscriminatedUnionMixin when used with
Pydantic's C bindings (pydantic-core) where discriminator values could
get mixed up between different subclasses.

Key changes:
- Remove direct assignment to __pydantic_core_schema__, __pydantic_validator__,
  and __pydantic_serializer__ - these are now managed by Pydantic internally
- Remove model_rebuild() override that was modifying model_fields after class
  construction and using TypeAdapter to bypass Pydantic's lifecycle
- Simplify __init_subclass__ to just set the kind field annotation and mark
  rebuild as required, rather than manually rebuilding abstract base classes
- Keep __get_pydantic_core_schema__ for generating proper discriminated union
  schemas for abstract types
- Remove unused TypeAdapter and ClassVar imports

The refactored implementation:
- Uses Pydantic's recommended hooks without bypassing its internal lifecycle
- Maintains backward compatibility with existing code using the mixin
- The kind field is still automatically set to the class name for concrete types
- Serialization/deserialization of polymorphic hierarchies continues to work
- JSON schema generation produces valid discriminated union schemas

Co-authored-by: openhands <openhands@all-hands.dev>
@tofarr tofarr closed this Dec 31, 2025
@tofarr tofarr deleted the fix/discriminated-union-pydantic-cbindings branch December 31, 2025 16:41
@tofarr tofarr restored the fix/discriminated-union-pydantic-cbindings branch December 31, 2025 20:13
@tofarr tofarr reopened this Dec 31, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 31, 2025

Coverage

Coverage Report •
FileStmtsMissCoverMissing
openhands-sdk/openhands/sdk/mcp
   tool.py895538%39–40, 50–51, 55–58, 62, 65, 68–71, 83, 107–109, 111–114, 125, 143–144, 147–151, 153–155, 161, 182, 184–185, 189, 192–193, 201–202, 210, 220–222, 227, 234–235, 237, 262–263, 267–269
openhands-sdk/openhands/sdk/tool
   schema.py1304565%24, 28–32, 34–41, 47–49, 134, 147–148, 150–151, 153–156, 159, 163–165, 167–168, 170, 177, 263, 277, 279–281, 283–286, 288–289
openhands-sdk/openhands/sdk/utils
   models.py1283969%42–43, 49, 51, 59–63, 86, 92, 134–136, 138, 202, 208–211, 213–214, 217, 220–225, 244, 257–258, 260–262, 264, 268, 270, 274
TOTAL14447682352% 

@tofarr tofarr marked this pull request as ready for review December 31, 2025 21:40
@tofarr tofarr marked this pull request as draft December 31, 2025 21:46
tofarr and others added 4 commits December 31, 2025 22:09
The previous implementation called model_json_schema() or TypeAdapter().json_schema()
for abstract classes, which created new schema generation contexts. This caused
infinite recursion when a concrete subclass (like PipelineCondenser) contained
a field referencing the abstract parent type (like condensers: list[CondenserBase]).

The fix always uses the provided handler to generate the base schema first, which
participates in pydantic's reference tracking and avoids recursion. For abstract
classes, we now only add discriminator info if the handler produces a oneOf schema.

Co-authored-by: openhands <openhands@all-hands.dev>
@tofarr tofarr force-pushed the fix/discriminated-union-pydantic-cbindings branch from eeafa0c to 5b43d17 Compare January 1, 2026 15:03
@tofarr tofarr force-pushed the fix/discriminated-union-pydantic-cbindings branch from 92e9d3d to 9b82aa2 Compare January 1, 2026 17:05
@openhands-ai
Copy link

openhands-ai bot commented Jan 1, 2026

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • Run tests

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #1555 at branch `fix/discriminated-union-pydantic-cbindings`

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

tofarr and others added 4 commits January 1, 2026 11:47
- Add thread-local storage for schema cache to ensure thread safety
- Add detailed warning docstring about repr string parsing fragility
- Replace dataclasses.MISSING with None as sentinel value
- Add comment explaining sanity check assert statement
- Update OpenHandsModel docstring with deprecation notice
- Re-add missing ERROR status assertion in test

Co-authored-by: openhands <openhands@all-hands.dev>
@tofarr tofarr marked this pull request as ready for review January 1, 2026 19:48
Copy link
Collaborator

@enyst enyst left a comment

Choose a reason for hiding this comment

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

Thank you for this!

Speaking of serialization... I think something happened here
https://github.com/OpenHands/docs/pull/229/files#r2656786421

@xingyaoww
Copy link
Collaborator

@OpenHands /codereview-roasted

@openhands-ai
Copy link

openhands-ai bot commented Jan 2, 2026

I'm on it! xingyaoww can track my progress at all-hands.dev

@openhands-ai
Copy link

openhands-ai bot commented Jan 2, 2026

Code Review Summary (Roasted Style)

I provided a critical code review of PR #1555 "Fix DiscriminatedUnionMixin issues with Pydantic C bindings" with a 🔴 Needs Improvement rating.

Critical Issues Identified:

  1. Fragile repr string parsing (_is_handler_for_current_class) - The code parses str(handler) to extract class names from Pydantic's internal repr format. This is undocumented behavior that will break when Pydantic updates.

  2. Input data mutation - data.pop("kind", None) mutates the caller's dictionary, which can cause subtle bugs. Also lacks type checking before calling .pop().

  3. Recursive serialization with fragile termination - The _serialize_by_kind method's recursion termination depends entirely on the fragile repr parsing.

  4. Empty inheritance layer - OpenHandsModel is deprecated but DiscriminatedUnionMixin still extends it, adding an unnecessary MRO layer.

  5. Undocumented breaking change - JSON output format changed from "key": "value" to "key":"value" (no space after colon), which could break consumers.

Improvement Opportunities:

  • _get_checked_concrete_subclasses is called repeatedly without caching
  • Thread-local storage for schema cache is over-engineered
  • Inconsistent error message formats
  • Behavior changes in error timing (errors now raised at model_json_schema() time instead of validation/definition time)

Verdict:

Needs rework - The PR removed ~250 lines of "hackery" but replaced it with different hackery (repr parsing). Neither approach is sustainable. If Pydantic doesn't provide the APIs needed, the recommendation is to work with the Pydantic team to add those APIs rather than building on undocumented behavior.


No code changes were made - this was a review-only request.

View full conversation

@xingyaoww xingyaoww added the integration-test Runs the integration tests and comments the results label Jan 2, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2026

Hi! I started running the integration tests on your PR. You will receive a comment with the results shortly.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2026

🧪 Integration Tests Results

Overall Success Rate: 0.0%
Total Cost: $0.00
Models Tested: 6
Timestamp: 2026-01-02 16:57:37 UTC

📁 Detailed Logs & Artifacts

Click the links below to access detailed agent/LLM logs showing the complete reasoning process for each model. On the GitHub Actions page, scroll down to the 'Artifacts' section to download the logs.

📊 Summary

Model Overall Integration (Required) Behavior (Optional) Tests Passed Skipped Total Cost Tokens
litellm_proxy_gpt_5.1_codex_max 0.0% 0.0% N/A 0/8 1 9 $0.00 0
litellm_proxy_claude_sonnet_4_5_20250929 0.0% 0.0% N/A 0/9 0 9 $0.00 0
litellm_proxy_deepseek_deepseek_chat 0.0% 0.0% N/A 0/8 1 9 $0.00 0
litellm_proxy_vertex_ai_gemini_3_pro_preview 0.0% 0.0% N/A 0/9 0 9 $0.00 0
litellm_proxy_mistral_devstral_2512 0.0% 0.0% N/A 0/8 1 9 $0.00 0
litellm_proxy_moonshot_kimi_k2_thinking 0.0% 0.0% N/A 0/8 1 9 $0.00 0

📋 Detailed Results

litellm_proxy_gpt_5.1_codex_max

  • Overall Success Rate: 0.0% (0/8)
  • Integration Tests (Required): 0.0% (0/9)
  • Total Cost: $0.00
  • Token Usage: 0
  • Run Suffix: litellm_proxy_gpt_5.1_codex_max_7457844_gpt51_codex_run_N9_20260102_165636
  • Skipped Tests: 1

Skipped Tests:

  • t09_token_condenser: This test stresses long repetitive tool loops to trigger token-based condensation. GPT-5.1 Codex Max often declines such requests for efficiency/safety reasons.

Failed Tests:

  • t02_add_bash_hello ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=b3ba384c-f9ed-452f-8164-373cfa8eca97: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - {"error":{"message":"Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable","type":"token_not_found_in_db","param":"key","code":"401"}} (Cost: $0.00)
  • t07_interactive_commands ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=e2bff287-a0bc-4df2-ad93-68b878dd8e4b: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - {"error":{"message":"Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable","type":"token_not_found_in_db","param":"key","code":"401"}} (Cost: $0.00)
  • t06_github_pr_browsing ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=78e16eba-8784-4836-8d51-e0cd3639e3d8: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - {"error":{"message":"Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable","type":"token_not_found_in_db","param":"key","code":"401"}} (Cost: $0.00)
  • t08_image_file_viewing ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=5275ace6-fbc2-4b2f-a99d-0688db60eef1: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - {"error":{"message":"Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable","type":"token_not_found_in_db","param":"key","code":"401"}} (Cost: $0.00)
  • t03_jupyter_write_file ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=6ebbb149-e632-4c7f-9def-342f067ac8c5: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - {"error":{"message":"Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable","type":"token_not_found_in_db","param":"key","code":"401"}} (Cost: $0.00)
  • t04_git_staging ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=14bb646d-8e92-4e10-b544-7cadad7b2dc4: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - {"error":{"message":"Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable","type":"token_not_found_in_db","param":"key","code":"401"}} (Cost: $0.00)
  • t01_fix_simple_typo ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=f16a164f-96f7-4749-9546-a6d45d9d001a: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - {"error":{"message":"Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable","type":"token_not_found_in_db","param":"key","code":"401"}} (Cost: $0.00)
  • t05_simple_browsing ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=79dea09c-266a-4a7a-87eb-1f510f861912: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - {"error":{"message":"Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable","type":"token_not_found_in_db","param":"key","code":"401"}} (Cost: $0.00)

litellm_proxy_claude_sonnet_4_5_20250929

  • Overall Success Rate: 0.0% (0/9)
  • Integration Tests (Required): 0.0% (0/9)
  • Total Cost: $0.00
  • Token Usage: 0
  • Run Suffix: litellm_proxy_claude_sonnet_4_5_20250929_7457844_sonnet_run_N9_20260102_165635

Failed Tests:

  • t06_github_pr_browsing ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=ce136dad-7c1e-4b29-98c9-c626e0c024f4: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t07_interactive_commands ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=d9c91864-3723-42ea-ad81-e7bd15fc332e: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t02_add_bash_hello ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=fee4b758-cc88-4337-893c-fc7c2a32c43b: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t01_fix_simple_typo ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=5c5de826-e103-4c8b-b3de-f7bdd5a56d49: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t04_git_staging ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=f739cf32-d0cf-4eee-891c-7b2a5ffc8e84: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t08_image_file_viewing ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=7f52b6f2-d4b6-49da-ae3c-14d1a37498d4: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t09_token_condenser ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=c00b2cda-07be-4399-8ade-530fa1840d78: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t03_jupyter_write_file ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=19250796-9816-4c4f-8b71-2edfe53d3af9: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t05_simple_browsing ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=c4628b75-7f8b-4fd0-8818-7ef6fe359ca7: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)

litellm_proxy_deepseek_deepseek_chat

  • Overall Success Rate: 0.0% (0/8)
  • Integration Tests (Required): 0.0% (0/9)
  • Total Cost: $0.00
  • Token Usage: 0
  • Run Suffix: litellm_proxy_deepseek_deepseek_chat_7457844_deepseek_run_N9_20260102_165635
  • Skipped Tests: 1

Skipped Tests:

  • t08_image_file_viewing: This test requires a vision-capable LLM model. Please use a model that supports image input.

Failed Tests:

  • t01_fix_simple_typo ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=0435a343-d571-4e85-8c0e-7021a714b8bb: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t04_git_staging ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=9ea4dfa8-b5ec-41b8-a6ef-d94ed71d3ce5: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t06_github_pr_browsing ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=0a9a5d05-0cfb-4a26-be0c-306310c3c301: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t02_add_bash_hello ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=f22a265e-234b-4b65-b600-344d9b6d8230: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t03_jupyter_write_file ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=abfea2be-6d64-43af-89a0-c0990452cdce: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t09_token_condenser ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=bfd0e18f-6199-488f-90a4-3433fcbc91a5: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t07_interactive_commands ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=606d4192-6a88-4db0-8157-fc4f27c0a3a5: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t05_simple_browsing ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=1e83f0a7-92bc-4ad7-b7df-9c891549e9b8: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)

litellm_proxy_vertex_ai_gemini_3_pro_preview

  • Overall Success Rate: 0.0% (0/9)
  • Integration Tests (Required): 0.0% (0/9)
  • Total Cost: $0.00
  • Token Usage: 0
  • Run Suffix: litellm_proxy_vertex_ai_gemini_3_pro_preview_7457844_gemini_3_pro_run_N9_20260102_165636

Failed Tests:

  • t04_git_staging ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=fb62c51f-29c4-4bf9-afe1-afa1eb420cbe: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t09_token_condenser ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=1c2fe729-e557-4465-9a04-0dba26497dd5: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t08_image_file_viewing ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=7f45cbe1-cc3b-48b1-b73e-a584d6e27493: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t06_github_pr_browsing ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=1b8ee739-431f-488d-a845-34fa4f789ed5: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t02_add_bash_hello ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=a73b11ad-60c4-4e72-9deb-68a42220d98d: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t07_interactive_commands ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=0b30c3db-06ec-4516-ba3e-4c76890ed4f9: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t01_fix_simple_typo ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=93deb465-38cd-4cdf-a559-f531d93c1dd0: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t03_jupyter_write_file ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=aff82ade-5dc7-4a12-b5bf-55dbb773b1c3: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t05_simple_browsing ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=35642b68-df6b-46ea-b1cb-2a9a55b35bf0: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)

litellm_proxy_mistral_devstral_2512

  • Overall Success Rate: 0.0% (0/8)
  • Integration Tests (Required): 0.0% (0/9)
  • Total Cost: $0.00
  • Token Usage: 0
  • Run Suffix: litellm_proxy_mistral_devstral_2512_7457844_devstral_2512_run_N9_20260102_165636
  • Skipped Tests: 1

Skipped Tests:

  • t08_image_file_viewing: This test requires a vision-capable LLM model. Please use a model that supports image input.

Failed Tests:

  • t07_interactive_commands ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=2edcc820-6af9-4dae-9065-e733ae4073ab: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t09_token_condenser ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=09b61d65-f6a3-4d4f-8029-77404d2aea67: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t04_git_staging ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=503d0338-9fae-4599-a88d-dfcb3f43f7de: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t01_fix_simple_typo ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=4a68c0b9-1623-47b9-b304-7ed45cb6f64a: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t02_add_bash_hello ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=32358fbe-ecd1-4ecc-a430-db19deb2149a: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t06_github_pr_browsing ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=c741c71b-a95d-4989-8fa7-77251ae9effd: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t03_jupyter_write_file ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=07a1e85c-ce78-401a-89ea-3310f1b1a856: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t05_simple_browsing ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=ffd6dce0-978e-43b2-83f6-59e4de7fdc0c: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)

litellm_proxy_moonshot_kimi_k2_thinking

  • Overall Success Rate: 0.0% (0/8)
  • Integration Tests (Required): 0.0% (0/9)
  • Total Cost: $0.00
  • Token Usage: 0
  • Run Suffix: litellm_proxy_moonshot_kimi_k2_thinking_7457844_kimi_k2_run_N9_20260102_165654
  • Skipped Tests: 1

Skipped Tests:

  • t08_image_file_viewing: This test requires a vision-capable LLM model. Please use a model that supports image input.

Failed Tests:

  • t03_jupyter_write_file ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=2ef350ee-2db2-4ab2-9ef0-385e97bca81a: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t06_github_pr_browsing ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=93d1f17a-0aa3-4b97-8862-cce4d6941449: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t01_fix_simple_typo ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=06ec1850-b165-4956-b9f9-41e689910755: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t09_token_condenser ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=0f1cd7b7-1bad-42f3-9458-6791acbb20bf: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t04_git_staging ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=f05df654-79e2-40d4-9b45-a42445a68432: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t07_interactive_commands ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=bd355c0b-1465-4fa8-9c82-03a3d40de791: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t02_add_bash_hello ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=70a59e78-30b7-402d-9edc-10f613a043de: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)
  • t05_simple_browsing ⚠️ REQUIRED: Test execution failed: Conversation run failed for id=a70bd347-c6f6-4851-b5ec-57242dd07020: litellm.AuthenticationError: AuthenticationError: Litellm_proxyException - Authentication Error, Invalid proxy server token passed. Received API Key = sk-...T9_Q, Key Hash (Token) =61c9fb32902f3b0764b58f832bcf8f0908410d7664c9b8d9030801eba8dbffde. Unable to find token in cache or LiteLLM_VerificationTokenTable (Cost: $0.00)

Copy link
Collaborator

@xingyaoww xingyaoww left a comment

Choose a reason for hiding this comment

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

This LGTM as long as everything in agent server is working correctly and pass all integration tests!

Appreciate this nice clean up 🙏

@xingyaoww xingyaoww added integration-test Runs the integration tests and comments the results and removed integration-test Runs the integration tests and comments the results labels Jan 2, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2026

Hi! I started running the integration tests on your PR. You will receive a comment with the results shortly.

@tofarr
Copy link
Collaborator Author

tofarr commented Jan 2, 2026

Unfortunately the repr parsing is the only way to get this working at present - given that the pydantic is using simple wrappers around rust functions. I call this out with the warning:

        WARNING: This is a fragile approach that relies on Pydantic's internal
        repr format for SerializerFunctionWrapHandler. The handler is a Pydantic
        wrapper around a Rust function that provides no public API for determining
        which class it serializes. Parsing the repr string is the only available
        mechanism.

Also, the extra unit tests mean that if pydantic change this format about 15 separate unit tests will break.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2026

🧪 Integration Tests Results

Overall Success Rate: 98.0%
Total Cost: $2.12
Models Tested: 6
Timestamp: 2026-01-02 17:19:31 UTC

📁 Detailed Logs & Artifacts

Click the links below to access detailed agent/LLM logs showing the complete reasoning process for each model. On the GitHub Actions page, scroll down to the 'Artifacts' section to download the logs.

📊 Summary

Model Overall Integration (Required) Behavior (Optional) Tests Passed Skipped Total Cost Tokens
litellm_proxy_deepseek_deepseek_chat 100.0% 100.0% N/A 8/8 1 9 $0.13 1,448,563
litellm_proxy_gpt_5.1_codex_max 100.0% 100.0% N/A 8/8 1 9 $0.17 208,472
litellm_proxy_moonshot_kimi_k2_thinking 100.0% 100.0% N/A 8/8 1 9 $0.37 586,598
litellm_proxy_mistral_devstral_2512 87.5% 87.5% N/A 7/8 1 9 $0.19 463,964
litellm_proxy_claude_sonnet_4_5_20250929 100.0% 100.0% N/A 9/9 0 9 $0.64 545,653
litellm_proxy_vertex_ai_gemini_3_pro_preview 100.0% 100.0% N/A 9/9 0 9 $0.61 377,235

📋 Detailed Results

litellm_proxy_deepseek_deepseek_chat

  • Overall Success Rate: 100.0% (8/8)
  • Integration Tests (Required): 100.0% (8/9)
  • Total Cost: $0.13
  • Token Usage: prompt: 1,430,667, completion: 17,896, cache_read: 1,363,520
  • Run Suffix: litellm_proxy_deepseek_deepseek_chat_7457844_deepseek_run_N9_20260102_170633
  • Skipped Tests: 1

Skipped Tests:

  • t08_image_file_viewing: This test requires a vision-capable LLM model. Please use a model that supports image input.

litellm_proxy_gpt_5.1_codex_max

  • Overall Success Rate: 100.0% (8/8)
  • Integration Tests (Required): 100.0% (8/9)
  • Total Cost: $0.17
  • Token Usage: prompt: 205,138, completion: 3,334, cache_read: 107,392, reasoning: 1,472
  • Run Suffix: litellm_proxy_gpt_5.1_codex_max_7457844_gpt51_codex_run_N9_20260102_170634
  • Skipped Tests: 1

Skipped Tests:

  • t09_token_condenser: This test stresses long repetitive tool loops to trigger token-based condensation. GPT-5.1 Codex Max often declines such requests for efficiency/safety reasons.

litellm_proxy_moonshot_kimi_k2_thinking

  • Overall Success Rate: 100.0% (8/8)
  • Integration Tests (Required): 100.0% (8/9)
  • Total Cost: $0.37
  • Token Usage: prompt: 575,111, completion: 11,487, cache_read: 502,784
  • Run Suffix: litellm_proxy_moonshot_kimi_k2_thinking_7457844_kimi_k2_run_N9_20260102_170633
  • Skipped Tests: 1

Skipped Tests:

  • t08_image_file_viewing: This test requires a vision-capable LLM model. Please use a model that supports image input.

litellm_proxy_mistral_devstral_2512

  • Overall Success Rate: 87.5% (7/8)
  • Integration Tests (Required): 87.5% (7/9)
  • Total Cost: $0.19
  • Token Usage: prompt: 459,378, completion: 4,586
  • Run Suffix: litellm_proxy_mistral_devstral_2512_7457844_devstral_2512_run_N9_20260102_170633
  • Skipped Tests: 1

Skipped Tests:

  • t08_image_file_viewing: This test requires a vision-capable LLM model. Please use a model that supports image input.

Failed Tests:

  • t02_add_bash_hello ⚠️ REQUIRED: Shell script is not executable (Cost: $0.01)

litellm_proxy_claude_sonnet_4_5_20250929

  • Overall Success Rate: 100.0% (9/9)
  • Integration Tests (Required): 100.0% (9/9)
  • Total Cost: $0.64
  • Token Usage: prompt: 533,972, completion: 11,681, cache_read: 444,679, cache_write: 88,373, reasoning: 3,179
  • Run Suffix: litellm_proxy_claude_sonnet_4_5_20250929_7457844_sonnet_run_N9_20260102_170633

litellm_proxy_vertex_ai_gemini_3_pro_preview

  • Overall Success Rate: 100.0% (9/9)
  • Integration Tests (Required): 100.0% (9/9)
  • Total Cost: $0.61
  • Token Usage: prompt: 354,558, completion: 22,677, cache_read: 206,084, reasoning: 18,039
  • Run Suffix: litellm_proxy_vertex_ai_gemini_3_pro_preview_7457844_gemini_3_pro_run_N9_20260102_170633

Copy link
Collaborator

@xingyaoww xingyaoww left a comment

Choose a reason for hiding this comment

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

LGTM! This is a definitely a net positive improvemnts

@tofarr tofarr merged commit 67a9ea4 into main Jan 2, 2026
49 checks passed
@tofarr tofarr deleted the fix/discriminated-union-pydantic-cbindings branch January 2, 2026 17:25
tofarr pushed a commit that referenced this pull request Jan 2, 2026
After a recent change in PR #1555, the discriminator field was removed
from the generated JSON schema for discriminated unions. This caused
the OpenAPI documentation tests to fail since Swagger UI needs the
discriminator field to properly display discriminated unions.

This commit re-adds the discriminator field with the proper mapping
in the __get_pydantic_json_schema__ method. The test expectation was
also updated to include the discriminator field.

Co-authored-by: openhands <openhands@all-hands.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-test Runs the integration tests and comments the results

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants