Use OAuth fallback for workflow text generation#13537
Merged
Merged
Conversation
Collaborator
🪼 branch checks and previews
Install Gradio from this PR pip install https://huggingface.co/buckets/gradio/pypi-previews/resolve/c933605e02a22f2976d340ff27e408715a436f8c/gradio-6.18.0-py3-none-any.whlInstall Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@c933605e02a22f2976d340ff27e408715a436f8c#subdirectory=client/python"Import Gradio JS Client from this PR via CDN import { Client } from "https://huggingface.co/buckets/gradio/npm-previews/resolve/c933605e02a22f2976d340ff27e408715a436f8c/browser.js"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes workflow text-generation calls so they only use browser-side streaming when the frontend has an HF token. If no frontend token is available, the workflow executor now falls back to the backend
call_modelpath, where Gradio can inject the logged-in user's OAuth token and use their inference provider credits.Also adds regression coverage that an empty manual token slot does not block OAuth or local write-token fallback on the backend.
Closes: #13536
AI Disclosure
Testing and Formatting Your Code
pytest -q test/test_workflow.py -k ResolveTokenpnpm exec vitest run --config .config/vitest.config.ts js/workflowcanvas/workflow/workflow-executor.test.tsbash scripts/format_backend.shbash scripts/format_frontend.sh