Commit Graph
7 Commits
Author SHA1 Message Date
shin-bot-litellmandGitHub b2c0bec5c5 fix(test): Update status enum values to match Google Interactions OpenAPI spec (#22061)
Google's Interactions API spec changed the status enum:
- Values are now lowercase (was uppercase)
- 'UNSPECIFIED' value was removed

Updated test to match the current spec from:
https://ai.google.dev/static/api/interactions.openapi.json
2026-02-24 20:26:11 -08:00
Ron ZhongandGitHub 73fd5a41e4 feat: Singapore guardrail policies (PDPA + MAS AI Risk Management) (#21948)
* feat: Singapore PDPA PII protection guardrail policy template

Add Singapore Personal Data Protection Act (PDPA) guardrail support:

Regex patterns (patterns.json):
- sg_nric: NRIC/FIN detection ([STFGM] + 7 digits + checksum letter)
- sg_phone: Singapore phone numbers (+65/0065/65 prefix)
- sg_postal_code: 6-digit postal codes (contextual)
- passport_singapore: Passport numbers (E/K + 7 digits, contextual)
- sg_uen: Unique Entity Numbers (3 formats)
- sg_bank_account: Bank account numbers (dash format, contextual)

YAML policy templates (5 sub-guardrails):
- sg_pdpa_personal_identifiers: s.13 Consent
- sg_pdpa_sensitive_data: Advisory Guidelines
- sg_pdpa_do_not_call: Part IX DNC Registry
- sg_pdpa_data_transfer: s.26 overseas transfers
- sg_pdpa_profiling_automated_decisions: Model AI Governance Framework

Policy template entry in policy_templates.json with 9 guardrail definitions
(4 regex-based + 5 YAML conditional keyword matching).

Tests:
- test_sg_patterns.py: regex pattern unit tests
- test_sg_pdpa_guardrails.py: conditional keyword matching tests (100+ cases)

* feat: MAS AI Risk Management Guidelines guardrail policy template

Add Monetary Authority of Singapore (MAS) AI Risk Management Guidelines
guardrail support for financial institutions:

YAML policy templates (5 sub-guardrails):
- sg_mas_fairness_bias: Blocks discriminatory financial AI (credit/loans/insurance by protected attributes)
- sg_mas_transparency_explainability: Blocks opaque/unexplainable AI for consequential financial decisions
- sg_mas_human_oversight: Blocks fully automated financial decisions without human-in-the-loop
- sg_mas_data_governance: Blocks unauthorized sharing/mishandling of financial customer data
- sg_mas_model_security: Blocks adversarial attacks, model poisoning, inversion on financial AI

Policy template entry in policy_templates.json with 5 guardrail definitions.
Aligned with MAS FEAT Principles, Project MindForge, and NIST AI RMF.

Tests:
- test_sg_mas_ai_guardrails.py: conditional keyword matching tests (100+ cases)

* fix: address SG pattern review feedback

- Update NRIC lowercase test for IGNORECASE runtime behavior
- Add keyword context guard to sg_uen pattern to reduce false positives

* docs: clarify MAS AIRM timeline references

- Explicitly mark MAS AIRM as Nov 2025 consultation draft
- Add 2018 qualifier for FEAT principles in MAS policy descriptions
- Update MAS guardrail wording to avoid release-year ambiguity

* chore: commit resolved MAS policy conflicts

* test:

* chore:
2026-02-23 12:08:22 -08:00
Julio Quinteros ProandClaude Opus 4.6 f94d0fe0b6 fix: add INCOMPLETE status to Interactions API enum and test
Google added INCOMPLETE to the Interactions API OpenAPI spec status enum.
Update both the Status3 enum in the SDK types and the test's expected
values to match.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 15:07:41 -03:00
Sameer Kankute 2d7f0a1351 fix: test_create_simple_string_input 2026-01-05 17:15:12 +05:30
Ishaan JaffandGitHub 0f63cbea59 [Feat] Interactions API - allow using all litellm providers (interactions -> responses api bridge) (#18373)
* add BaseInteractionsTest

* add interactions_api_handler

* init bridge

* init LiteLLMResponsesInteractionsConfig

* LiteLLMResponsesInteractionsHandler

* mv test

* fixes api spec

* docs

* fix transform+iterators

* docs fix

* fix iterator
2025-12-23 22:30:22 +05:30
Alexsander HamirandGitHub f353bb6dba [Fix] CI/CD - litellm_mapped_tests_llms | litellm_mapped_tests_core | caching_unit_tests (#18197) 2025-12-18 08:49:23 -08:00
Ishaan JaffandGitHub c727c8216f [Feat] New Endpoint - Google Interactions API - added on litellm SDK (#18079)
* init BaseInteractionsAPIConfig

* updated types for interactions API

* fix SDK level interactions API

* InteractionsAPIRequestUtils

* init base

* init interactions API

* init Interactions API Types

* init interactins API

* GoogleAIStudioInteractionsConfig

* init http handler

* remove file no longer needed

* test OPENAPI_SPEC_URL

* TestGoogleInteractionsCreate
2025-12-17 02:18:51 +04:00