Skip to main content

Parameter transformation utilities for LangGate

Project description

LangGate Transform

Parameter transformation utilities for LangGate AI Gateway.

This package provides the core parameter transformation logic used by both:

  • Local registry clients to transform parameters for direct model calls
  • The Envoy external processor to transform parameters in the proxy

It implements a declarative approach to parameter transformation that can be:

  1. Used directly in Python applications
  2. Potentially reimplemented in other languages (like Go) for external processors
  3. Extended with custom transformation rules

Parameter Transformation Precedence

The transformation module follows a specific precedence order when applying parameter transformations:

Defaults (applied only if key doesn't exist yet):

  1. Model-specific defaults (highest precedence for defaults)
  2. Pattern defaults (matching patterns applied in config order)
  3. Service provider defaults
  4. Global defaults (lowest precedence for defaults)

Overrides/Removals/Renames (applied in order, later steps overwrite/modify earlier ones):

  1. Input parameters (initial state)
  2. Service-level API keys and base URLs
  3. Service-level overrides, removals, renames
  4. Pattern-level overrides, removals, renames (matching patterns applied in config order)
  5. Model-specific overrides, removals, renames (highest precedence)
  6. Model ID (always overwritten with service_model_id)
  7. Environment variable substitution (applied last to all string values)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langgate_transform-0.1.6.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langgate_transform-0.1.6-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file langgate_transform-0.1.6.tar.gz.

File metadata

  • Download URL: langgate_transform-0.1.6.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.9

File hashes

Hashes for langgate_transform-0.1.6.tar.gz
Algorithm Hash digest
SHA256 68bce97c8b2d5809fe879cccbe96744b1bfc2f4a02a6eef5df8d7385438a0013
MD5 afb5d867be242cb2991a1cebb2e3a643
BLAKE2b-256 2c980f9a1be59ed7826eaabee8e99b2878ff6edcfe85ec731bab08d56724bfde

See more details on using hashes here.

File details

Details for the file langgate_transform-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for langgate_transform-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8c467da0087c727a88ffadc5244b7ffe0db813cc6daa91fe55f78efbaaaadcf6
MD5 4c9306cb9e9ee2d2b6059408bbaf7943
BLAKE2b-256 eb67b10355e73a8e244ea73e4f5f4ad4d57e810123f81f81a874c07ac31092db

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page