Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix(workflow): Update issue labeling with working regex pattern (#18821)

Cesar Garcia86b71d4713e2
diff --git a/.github/workflows/label-component.yml b/.github/workflows/label-component.yml
index 9a547c162a6..76b8316790c 100644
--- a/.github/workflows/label-component.yml
+++ b/.github/workflows/label-component.yml
@@ -11,134 +11,72 @@ jobs:
permissions:
issues: write
steps:
- - name: Add SDK label
- if: contains(github.event.issue.body, 'What part of LiteLLM is this about?\n\nSDK (litellm Python package)')
+ - name: Add component labels
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
- const labelName = 'sdk';
- try {
- await github.rest.issues.getLabel({
- owner: context.repo.owner,
- repo: context.repo.repo,
- name: labelName
- });
- } catch (error) {
- if (error.status === 404) {
- await github.rest.issues.createLabel({
- owner: context.repo.owner,
- repo: context.repo.repo,
- name: labelName,
- color: '0E7C86',
- description: 'Issues related to the litellm Python SDK'
- });
- } else {
- throw error;
- }
- }
- await github.rest.issues.addLabels({
- owner: context.repo.owner,
- repo: context.repo.repo,
- issue_number: context.issue.number,
- labels: [labelName]
- });
+ const body = context.payload.issue.body;
+ if (!body) return;
- - name: Add Proxy label
- if: contains(github.event.issue.body, 'What part of LiteLLM is this about?\n\nProxy')
- uses: actions/github-script@v7
- with:
- github-token: ${{ secrets.GITHUB_TOKEN }}
- script: |
- const labelName = 'proxy';
- try {
- await github.rest.issues.getLabel({
- owner: context.repo.owner,
- repo: context.repo.repo,
- name: labelName
- });
- } catch (error) {
- if (error.status === 404) {
- await github.rest.issues.createLabel({
- owner: context.repo.owner,
- repo: context.repo.repo,
- name: labelName,
- color: '5319E7',
- description: 'Issues related to the LiteLLM Proxy'
- });
- } else {
- throw error;
+ // Define component mappings with regex patterns that handle flexible whitespace
+ const components = [
+ {
+ pattern: /What part of LiteLLM is this about\?\s*SDK \(litellm Python package\)/,
+ label: 'sdk',
+ color: '0E7C86',
+ description: 'Issues related to the litellm Python SDK'
+ },
+ {
+ pattern: /What part of LiteLLM is this about\?\s*Proxy/,
+ label: 'proxy',
+ color: '5319E7',
+ description: 'Issues related to the LiteLLM Proxy'
+ },
+ {
+ pattern: /What part of LiteLLM is this about\?\s*UI Dashboard/,
+ label: 'ui-dashboard',
+ color: 'D876E3',
+ description: 'Issues related to the LiteLLM UI Dashboard'
+ },
+ {
+ pattern: /What part of LiteLLM is this about\?\s*Docs/,
+ label: 'docs',
+ color: 'FBCA04',
+ description: 'Issues related to LiteLLM documentation'
}
- }
- await github.rest.issues.addLabels({
- owner: context.repo.owner,
- repo: context.repo.repo,
- issue_number: context.issue.number,
- labels: [labelName]
- });
+ ];
- - name: Add UI Dashboard label
- if: contains(github.event.issue.body, 'What part of LiteLLM is this about?\n\nUI Dashboard')
- uses: actions/github-script@v7
- with:
- github-token: ${{ secrets.GITHUB_TOKEN }}
- script: |
- const labelName = 'ui-dashboard';
- try {
- await github.rest.issues.getLabel({
- owner: context.repo.owner,
- repo: context.repo.repo,
- name: labelName
- });
- } catch (error) {
- if (error.status === 404) {
- await github.rest.issues.createLabel({
- owner: context.repo.owner,
- repo: context.repo.repo,
- name: labelName,
- color: 'D876E3',
- description: 'Issues related to the LiteLLM UI Dashboard'
- });
- } else {
- throw error;
- }
- }
- await github.rest.issues.addLabels({
- owner: context.repo.owner,
- repo: context.repo.repo,
- issue_number: context.issue.number,
- labels: [labelName]
- });
+ // Find matching component
+ for (const component of components) {
+ if (component.pattern.test(body)) {
+ // Ensure label exists
+ try {
+ await github.rest.issues.getLabel({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ name: component.label
+ });
+ } catch (error) {
+ if (error.status === 404) {
+ await github.rest.issues.createLabel({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ name: component.label,
+ color: component.color,
+ description: component.description
+ });
+ }
+ }
- - name: Add Docs label
- if: contains(github.event.issue.body, 'What part of LiteLLM is this about?\n\nDocs')
- uses: actions/github-script@v7
- with:
- github-token: ${{ secrets.GITHUB_TOKEN }}
- script: |
- const labelName = 'docs';
- try {
- await github.rest.issues.getLabel({
- owner: context.repo.owner,
- repo: context.repo.repo,
- name: labelName
- });
- } catch (error) {
- if (error.status === 404) {
- await github.rest.issues.createLabel({
+ // Add label to issue
+ await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
- name: labelName,
- color: 'FBCA04',
- description: 'Issues related to LiteLLM documentation'
+ issue_number: context.issue.number,
+ labels: [component.label]
});
- } else {
- throw error;
+
+ break;
}
}
- await github.rest.issues.addLabels({
- owner: context.repo.owner,
- repo: context.repo.repo,
- issue_number: context.issue.number,
- labels: [labelName]
- });
diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json
index 73579db75cd..3c2c20b4dce 100644
--- a/model_prices_and_context_window.json
+++ b/model_prices_and_context_window.json
@@ -7800,7 +7800,7 @@
"litellm_provider": "deepseek",
"max_input_tokens": 131072,
"max_output_tokens": 8192,
- "max_tokens": 131072,
+ "max_tokens": 8192,
"mode": "chat",
"output_cost_per_token": 1.7e-06,
"source": "https://api-docs.deepseek.com/quick_start/pricing",
@@ -7854,7 +7854,7 @@
"litellm_provider": "dashscope",
"max_input_tokens": 997952,
"max_output_tokens": 32768,
- "max_tokens": 1000000,
+ "max_tokens": 32768,
"mode": "chat",
"source": "https://www.alibabacloud.com/help/en/model-studio/models",
"supports_function_calling": true,
@@ -8579,7 +8579,7 @@
"litellm_provider": "databricks",
"max_input_tokens": 128000,
"max_output_tokens": 32000,
- "max_tokens": 128000,
+ "max_tokens": 32000,
"metadata": {
"notes": "Input/output cost per token is dbu cost * $0.070. Number provided for reference, '*_dbu_cost_per_token' used in actual calculation."
},