cite-agent 1.3.4__py3-none-any.whl → 1.3.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of cite-agent might be problematic. Click here for more details.

cite_agent/__version__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.3.4"
1
+ __version__ = "1.3.5"
@@ -1698,10 +1698,58 @@ class EnhancedNocturnalAgent:
1698
1698
 
1699
1699
  elif response.status == 503:
1700
1700
  # Backend AI service temporarily unavailable (Cerebras/Groq rate limited)
1701
- # Graceful degradation: return helpful message instead of error
1701
+ # Auto-retry with exponential backoff
1702
+ max_retries = 3
1703
+ retry_delays = [5, 15, 30] # seconds
1704
+
1705
+ for retry_num in range(max_retries):
1706
+ delay = retry_delays[retry_num]
1707
+ print(f"\n⏳ Hit rate limit. Waiting {delay} seconds before retry {retry_num + 1}/{max_retries}...")
1708
+
1709
+ # Wait with countdown
1710
+ import asyncio
1711
+ for remaining in range(delay, 0, -1):
1712
+ print(f"\r⏱️ Retrying in {remaining}s...", end='', flush=True)
1713
+ await asyncio.sleep(1)
1714
+ print("\r🔄 Retrying now... ")
1715
+
1716
+ # Retry the request
1717
+ async with self.session.post(url, json=payload, headers=headers, timeout=60) as retry_response:
1718
+ if retry_response.status == 200:
1719
+ # Success after retry!
1720
+ data = await retry_response.json()
1721
+ response_text = data.get('response', '')
1722
+ tokens = data.get('tokens_used', 0)
1723
+
1724
+ all_tools = tools_used or []
1725
+ all_tools.append("backend_llm")
1726
+
1727
+ self.workflow.save_query_result(
1728
+ query=query,
1729
+ response=response_text,
1730
+ metadata={
1731
+ "tools_used": all_tools,
1732
+ "tokens_used": tokens,
1733
+ "model": data.get('model'),
1734
+ "provider": data.get('provider'),
1735
+ "retries": retry_num + 1
1736
+ }
1737
+ )
1738
+
1739
+ return ChatResponse(
1740
+ response=response_text,
1741
+ tokens_used=tokens,
1742
+ model_used=data.get('model'),
1743
+ sources=data.get('sources', [])
1744
+ )
1745
+ elif retry_response.status != 503:
1746
+ # Different error, stop retrying
1747
+ break
1748
+
1749
+ # All retries failed
1702
1750
  return ChatResponse(
1703
- response="⚠️ AI service temporarily busy. Try again in a moment, or rephrase your question.",
1704
- error_message="Service temporarily unavailable"
1751
+ response=" Service still unavailable after retries. Please try again in a few minutes.",
1752
+ error_message="Service temporarily unavailable after retries"
1705
1753
  )
1706
1754
 
1707
1755
  elif response.status == 200:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cite-agent
3
- Version: 1.3.4
3
+ Version: 1.3.5
4
4
  Summary: Terminal AI assistant for academic research with citation verification
5
5
  Home-page: https://github.com/Spectating101/cite-agent
6
6
  Author: Cite-Agent Team
@@ -1,6 +1,6 @@
1
1
  cite_agent/__init__.py,sha256=wAXV2v8nNOmIAd0rh8196ItBl9hHWBVOBl5Re4VB77I,1645
2
2
  cite_agent/__main__.py,sha256=6x3lltwG-iZHeQbN12rwvdkPDfd2Rmdk71tOOaC89Mw,179
3
- cite_agent/__version__.py,sha256=U6E-HRsrit7kgSGgIeTI2eMUeyUCny5DH8LDV4I1o0g,22
3
+ cite_agent/__version__.py,sha256=tdqvkGH0OryRjjXzO3HS5DyYol-VTO9fC8m43nB2PgI,22
4
4
  cite_agent/account_client.py,sha256=yLuzhIJoIZuXHXGbaVMzDxRATQwcy-wiaLnUrDuwUhI,5725
5
5
  cite_agent/agent_backend_only.py,sha256=H4DH4hmKhT0T3rQLAb2xnnJVjxl3pOZaljL9r6JndFY,6314
6
6
  cite_agent/ascii_plotting.py,sha256=lk8BaECs6fmjtp4iH12G09-frlRehAN7HLhHt2crers,8570
@@ -11,7 +11,7 @@ cite_agent/cli_conversational.py,sha256=RAmgRNRyB8gQ8QLvWU-Tt23j2lmA34rQNT5F3_7S
11
11
  cite_agent/cli_enhanced.py,sha256=EAaSw9qtiYRWUXF6_05T19GCXlz9cCSz6n41ASnXIPc,7407
12
12
  cite_agent/cli_workflow.py,sha256=4oS_jW9D8ylovXbEFdsyLQONt4o0xxR4Xatfcc4tnBs,11641
13
13
  cite_agent/dashboard.py,sha256=VGV5XQU1PnqvTsxfKMcue3j2ri_nvm9Be6O5aVays_w,10502
14
- cite_agent/enhanced_ai_agent.py,sha256=HfCotlyrtBRXx6ENa8pRnG_x0JZ5izoIE87VwgLWAhU,165207
14
+ cite_agent/enhanced_ai_agent.py,sha256=ha7cps216cNV59yLnQe2-K8Af9wXmSL7TokT3TX-JuY,167857
15
15
  cite_agent/rate_limiter.py,sha256=-0fXx8Tl4zVB4O28n9ojU2weRo-FBF1cJo9Z5jC2LxQ,10908
16
16
  cite_agent/session_manager.py,sha256=B0MXSOsXdhO3DlvTG7S8x6pmGlYEDvIZ-o8TZM23niQ,9444
17
17
  cite_agent/setup_config.py,sha256=3m2e3gw0srEWA0OygdRo64r-8HK5ohyXfct0c__CF3s,16817
@@ -22,7 +22,7 @@ cite_agent/updater.py,sha256=udoAAN4gBKAvKDV7JTh2FJO_jIhNk9bby4x6n188MEY,8458
22
22
  cite_agent/web_search.py,sha256=FZCuNO7MAITiOIbpPbJyt2bzbXPzQla-9amJpnMpW_4,6520
23
23
  cite_agent/workflow.py,sha256=a0YC0Mzz4or1C5t2gZcuJBQ0uMOZrooaI8eLu2kkI0k,15086
24
24
  cite_agent/workflow_integration.py,sha256=A9ua0DN5pRtuU0cAwrUTGvqt2SXKhEHQbrHx16EGnDM,10910
25
- cite_agent-1.3.4.dist-info/licenses/LICENSE,sha256=XJkyO4IymhSUniN1ENY6lLrL2729gn_rbRlFK6_Hi9M,1074
25
+ cite_agent-1.3.5.dist-info/licenses/LICENSE,sha256=XJkyO4IymhSUniN1ENY6lLrL2729gn_rbRlFK6_Hi9M,1074
26
26
  src/__init__.py,sha256=0eEpjRfjRjOTilP66y-AbGNslBsVYr_clE-bZUzsX7s,40
27
27
  src/services/__init__.py,sha256=pTGLCH_84mz4nGtYMwQES5w-LzoSulUtx_uuNM6r-LA,4257
28
28
  src/services/simple_enhanced_main.py,sha256=IJoOplCqcVUg3GvN_BRyAhpGrLm_WEPy2jmHcNCY6R0,9257
@@ -49,8 +49,8 @@ src/services/research_service/synthesizer.py,sha256=lCcu37PWhWVNphHKaJJDIC-JQ5OI
49
49
  src/services/search_service/__init__.py,sha256=UZFXdd7r6wietQ2kESXEyGffdfBbpghquecQde7auF4,137
50
50
  src/services/search_service/indexer.py,sha256=u3-uwdAfmahWWsdebDF9i8XIyp7YtUMIHzlmBLBnPPM,7252
51
51
  src/services/search_service/search_engine.py,sha256=S9HqQ_mk-8W4d4MUOgBbEGQGV29-eSuceSFvVb4Xk-k,12500
52
- cite_agent-1.3.4.dist-info/METADATA,sha256=AFuXC6Gvnkb1wUAuau1XbuD-xNVlJdmjoKBHyaG-0OM,12231
53
- cite_agent-1.3.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
54
- cite_agent-1.3.4.dist-info/entry_points.txt,sha256=bJ0u28nFIxQKH1PWQ2ak4PV-FAjhoxTC7YADEdDenFw,83
55
- cite_agent-1.3.4.dist-info/top_level.txt,sha256=TgOFqJTIy8vDZuOoYA2QgagkqZtfhM5Acvt_IsWzAKo,15
56
- cite_agent-1.3.4.dist-info/RECORD,,
52
+ cite_agent-1.3.5.dist-info/METADATA,sha256=qCT90yGGiD7au0geLi4DZYVpOH2i7bWWNJb1tLZHryw,12231
53
+ cite_agent-1.3.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
54
+ cite_agent-1.3.5.dist-info/entry_points.txt,sha256=bJ0u28nFIxQKH1PWQ2ak4PV-FAjhoxTC7YADEdDenFw,83
55
+ cite_agent-1.3.5.dist-info/top_level.txt,sha256=TgOFqJTIy8vDZuOoYA2QgagkqZtfhM5Acvt_IsWzAKo,15
56
+ cite_agent-1.3.5.dist-info/RECORD,,