mirror of
https://github.com/AJaySi/ALwrity.git
synced 2026-04-25 08:55:58 +03:00
[PR #419] [MERGED] Hugging Face provider: remove env side-effects, add client cache, and tune retries #724
Labels
No labels
AI Content Agents
AI Content Strategy
AI Content planning
AI Marketing Tools
AI SEO
AI personalization
AI writer
ALwrity Copi-lot
Alwrity web search
Anthropic
DeepSeek
Gemini AI
Integration
LLM
OnBoarding
OnBoarding
RAG knowledgebase Memory
bug
documentation
enhancement
good first issue
help wanted
invalid
openai
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ALwrity#724
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/AJaySi/ALwrity/pull/419
Author: @AJaySi
Created: 3/12/2026
Status: ✅ Merged
Merged: 3/12/2026
Merged by: @AJaySi
Base:
main← Head:codex/refactor-huggingface_provider.py-service📝 Commits (1)
7df7d87Refine Hugging Face provider retries and client reuse📊 Changes
1 file changed (+94 additions, -39 deletions)
View changed files
📝
backend/services/llm_providers/huggingface_provider.py(+94 -39)📄 Description
Motivation
Description
dotenvimport-time.envloading andprint(...)side effects so the module no longer performs environment bootstrapping on import.time.sleep(1)throttling from both text and structured request paths.get_huggingface_client(api_key)to reuse OpenAI/HF clients instead of reconstructing them per request.reraise=Trueto avoid hidden latency amplification across fallback attempts.response_formatfallback) to aid performance troubleshooting.Testing
python -m py_compile backend/services/llm_providers/huggingface_provider.pywhich completed successfully.Codex Task
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.