opspilot-ai 0.1.2__tar.gz → 0.1.3__tar.gz
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.
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/PKG-INFO +1 -1
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/cli.py +18 -1
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/utils/llm_providers.py +10 -2
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/pyproject.toml +1 -1
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/.env.example +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/ARCHITECTURE.md +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/DEPLOYMENT.md +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/LICENSE +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/MANIFEST.in +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/README.md +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/__init__.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/agents/fixer.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/agents/planner.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/agents/remediation.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/agents/verifier.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/config.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/context/__init__.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/context/deployment_history.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/context/deps.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/context/docker.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/context/env.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/context/logs.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/context/production_logs.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/context/project.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/diffs/redis.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/graph/engine.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/graph/nodes.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/memory.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/memory_redis.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/state.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/tools/__init__.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/tools/dep_tools.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/tools/env_tools.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/tools/log_tools.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/tools/pattern_analysis.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/utils/__init__.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot/utils/llm.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/opspilot_ai.egg-info/SOURCES.txt +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/setup.cfg +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/setup.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/tests/__init__.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/tests/test_llm_providers.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/tests/test_pattern_analysis.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/tests/test_production_logs.py +0 -0
- {opspilot_ai-0.1.2 → opspilot_ai-0.1.3}/tests/test_remediation.py +0 -0
|
@@ -47,9 +47,26 @@ load_dotenv(verbose=False, override=False) # Don't override existing env vars
|
|
|
47
47
|
app = typer.Typer(help="OpsPilot - Agentic AI CLI for incident analysis")
|
|
48
48
|
console = Console()
|
|
49
49
|
|
|
50
|
+
__version__ = "0.1.2"
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def version_callback(value: bool):
|
|
54
|
+
if value:
|
|
55
|
+
console.print(f"OpsPilot version {__version__}")
|
|
56
|
+
raise typer.Exit()
|
|
57
|
+
|
|
50
58
|
|
|
51
59
|
@app.callback()
|
|
52
|
-
def main(
|
|
60
|
+
def main(
|
|
61
|
+
version: bool = typer.Option(
|
|
62
|
+
None,
|
|
63
|
+
"--version",
|
|
64
|
+
"-V",
|
|
65
|
+
callback=version_callback,
|
|
66
|
+
is_eager=True,
|
|
67
|
+
help="Show OpsPilot version and exit"
|
|
68
|
+
)
|
|
69
|
+
):
|
|
53
70
|
"""
|
|
54
71
|
OpsPilot CLI entry point.
|
|
55
72
|
"""
|
|
@@ -121,7 +121,7 @@ class OllamaProvider(LLMProvider):
|
|
|
121
121
|
class OpenRouterProvider(LLMProvider):
|
|
122
122
|
"""OpenRouter provider - access to many free open-source models."""
|
|
123
123
|
|
|
124
|
-
def __init__(self, model: str = "
|
|
124
|
+
def __init__(self, model: str = "openrouter/free", timeout: int = 60):
|
|
125
125
|
super().__init__(timeout)
|
|
126
126
|
self.model = model
|
|
127
127
|
self.api_key = os.getenv("OPENROUTER_API_KEY") # Free tier available
|
|
@@ -159,7 +159,15 @@ class OpenRouterProvider(LLMProvider):
|
|
|
159
159
|
json=payload,
|
|
160
160
|
timeout=self.timeout
|
|
161
161
|
)
|
|
162
|
-
|
|
162
|
+
|
|
163
|
+
# Try to get more details from error response
|
|
164
|
+
if not response.ok:
|
|
165
|
+
try:
|
|
166
|
+
error_data = response.json()
|
|
167
|
+
error_msg = error_data.get("error", {}).get("message", response.text)
|
|
168
|
+
except Exception:
|
|
169
|
+
error_msg = response.text or f"HTTP {response.status_code}"
|
|
170
|
+
raise RuntimeError(f"OpenRouter API error ({response.status_code}): {error_msg}")
|
|
163
171
|
|
|
164
172
|
data = response.json()
|
|
165
173
|
return data["choices"][0]["message"]["content"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|