mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-26 01:12:21 +00:00
Reported error after the cross-loop fix: Tokens obtained but DB persist failed: Unable to match input value to any allowed input type for the field. Parse errors: [... ``credential_values`` should be of any of the following types: ``JsonNullValueInput``, ``Json`` ...] Prisma's Json columns ingest pre-serialized JSON *strings*, not raw Python dicts. The ``/credentials`` endpoint wraps the payload with ``jsonify_object(...)`` (in ``litellm/proxy/utils.py``) which does ``json.dumps`` per nested-dict field. My persist helper was skipping that step and passing raw dicts — Prisma's binding layer then couldn't match them to the ``Json`` type. Route the ``credential_values`` + ``credential_info`` dicts through ``jsonify_object`` before the upsert. Same fix in both ChatGPT and Copilot ``db_authenticator.py``. Tests updated to assert the serialized string form (``json.loads(kwargs[...]["credential_values"])``). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| embedding | ||
| responses | ||
| test_copilot_db_authenticator.py | ||
| test_copilot_oauth_dispatch.py | ||
| test_github_copilot_authenticator.py | ||
| test_github_copilot_transformation.py | ||