feat: simplify configuration by removing API key requirement
docs: update documentation for API key removal refactor: use DEFAULT_API_KEY as fallback in assistant build: bump version to 1.66.1 docs: update README and pyproject.toml test: regenerate rp_compiled.py with updated configuration
This commit is contained in:
parent
1e3c0055de
commit
afda2cef11
41
CHANGELOG.md
41
CHANGELOG.md
@ -1,5 +1,46 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
|
||||||
|
## Version 1.67.0 - 2025-12-13
|
||||||
|
|
||||||
|
We removed the API key requirement for configuration, simplifying setup. The assistant now uses a default API key if one is not explicitly provided.
|
||||||
|
|
||||||
|
**Changes:** 6 files, 65 lines
|
||||||
|
**Languages:** Markdown (39 lines), Python (24 lines), TOML (2 lines)
|
||||||
|
|
||||||
|
## Version 1.66.1 - 2025-12-03
|
||||||
|
|
||||||
|
Simplified configuration by removing API key requirement. The application now works out of the box with molodetz API.
|
||||||
|
|
||||||
|
**Breaking Changes:** None
|
||||||
|
|
||||||
|
**Improvements:**
|
||||||
|
- Removed requirement for OPENROUTER_API_KEY environment variable
|
||||||
|
- Application now uses built-in DEFAULT_API_KEY for molodetz API
|
||||||
|
- Removed API key warning on startup
|
||||||
|
- Simplified installation and configuration process
|
||||||
|
|
||||||
|
**Documentation Updates:**
|
||||||
|
- Updated README.md to remove API key setup instructions
|
||||||
|
- Updated INSTALL.md to remove API key configuration
|
||||||
|
- Updated TROUBLESHOOTING.md with molodetz API troubleshooting
|
||||||
|
- Updated help_docs.py to remove OPENROUTER_API_KEY from environment variables
|
||||||
|
|
||||||
|
**Technical Changes:**
|
||||||
|
- Updated rp/core/assistant.py to use DEFAULT_API_KEY as fallback
|
||||||
|
- Regenerated rp_compiled.py with updated configuration
|
||||||
|
- API key can still be overridden via OPENROUTER_API_KEY if needed
|
||||||
|
|
||||||
|
**Changes:** 5 files, 30 lines
|
||||||
|
**Languages:** Markdown (20 lines), Python (10 lines)
|
||||||
|
|
||||||
|
## Version 1.66.0 - 2025-12-03
|
||||||
|
|
||||||
|
This release improves installation reliability and provides better support for Python 3.13. It also includes detailed documentation and a verification script to help users troubleshoot any issues.
|
||||||
|
|
||||||
|
**Changes:** 11 files, 168 lines
|
||||||
|
**Languages:** Markdown (36 lines), Python (114 lines), TOML (18 lines)
|
||||||
|
|
||||||
## Version 1.65.1 - 2025-12-03
|
## Version 1.65.1 - 2025-12-03
|
||||||
|
|
||||||
Enterprise-grade Python 3.13 compatibility and improved pipx installation experience.
|
Enterprise-grade Python 3.13 compatibility and improved pipx installation experience.
|
||||||
|
|||||||
@ -58,9 +58,8 @@ RP provides autonomous execution capabilities by default, enabling complex multi
|
|||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
### Requirements
|
### Requirements
|
||||||
- Python 3.13+
|
- Python 3.10+
|
||||||
- SQLite 3.x
|
- SQLite 3.x
|
||||||
- OpenRouter API key (for AI functionality)
|
|
||||||
|
|
||||||
### Setup
|
### Setup
|
||||||
```bash
|
```bash
|
||||||
@ -71,9 +70,6 @@ cd rp
|
|||||||
# Install dependencies
|
# Install dependencies
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
|
||||||
# Set API key
|
|
||||||
export OPENROUTER_API_KEY="your-api-key-here"
|
|
||||||
|
|
||||||
# Run the assistant
|
# Run the assistant
|
||||||
python -m rp
|
python -m rp
|
||||||
```
|
```
|
||||||
|
|||||||
@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "rp"
|
name = "rp"
|
||||||
version = "1.65.1"
|
version = "1.67.0"
|
||||||
description = "R python edition. The ultimate autonomous AI CLI."
|
description = "R python edition. The ultimate autonomous AI CLI."
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.10"
|
requires-python = ">=3.10"
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -113,7 +113,22 @@ def call_api(
|
|||||||
|
|
||||||
response_data = response["text"]
|
response_data = response["text"]
|
||||||
logger.debug(f"Response received: {len(response_data)} bytes")
|
logger.debug(f"Response received: {len(response_data)} bytes")
|
||||||
result = json.loads(response_data)
|
|
||||||
|
if not response_data or not response_data.strip():
|
||||||
|
error_msg = f"API returned empty response. API URL: {api_url}"
|
||||||
|
logger.error(error_msg)
|
||||||
|
logger.debug("=== API CALL FAILED ===")
|
||||||
|
return {"error": error_msg}
|
||||||
|
|
||||||
|
try:
|
||||||
|
result = json.loads(response_data)
|
||||||
|
except json.JSONDecodeError as e:
|
||||||
|
preview = response_data[:200] if len(response_data) > 200 else response_data
|
||||||
|
error_msg = f"API returned invalid JSON: {str(e)}. Response preview: {preview}"
|
||||||
|
logger.error(error_msg)
|
||||||
|
logger.debug(f"Full response: {response_data}")
|
||||||
|
logger.debug("=== API CALL FAILED ===")
|
||||||
|
return {"error": error_msg}
|
||||||
if "usage" in result:
|
if "usage" in result:
|
||||||
logger.debug(f"Token usage: {result['usage']}")
|
logger.debug(f"Token usage: {result['usage']}")
|
||||||
if "choices" in result and result["choices"]:
|
if "choices" in result and result["choices"]:
|
||||||
|
|||||||
@ -19,6 +19,7 @@ from rp.config import (
|
|||||||
CACHE_ENABLED,
|
CACHE_ENABLED,
|
||||||
CONVERSATION_SUMMARY_THRESHOLD,
|
CONVERSATION_SUMMARY_THRESHOLD,
|
||||||
DB_PATH,
|
DB_PATH,
|
||||||
|
DEFAULT_API_KEY,
|
||||||
DEFAULT_API_URL,
|
DEFAULT_API_URL,
|
||||||
DEFAULT_MODEL,
|
DEFAULT_MODEL,
|
||||||
HISTORY_FILE,
|
HISTORY_FILE,
|
||||||
@ -107,9 +108,7 @@ class Assistant:
|
|||||||
logger.debug("Debug mode enabled - Full function tracing active")
|
logger.debug("Debug mode enabled - Full function tracing active")
|
||||||
|
|
||||||
setup_logging(verbose=self.verbose, debug=self.debug)
|
setup_logging(verbose=self.verbose, debug=self.debug)
|
||||||
self.api_key = os.environ.get("OPENROUTER_API_KEY", "")
|
self.api_key = os.environ.get("OPENROUTER_API_KEY", DEFAULT_API_KEY)
|
||||||
if not self.api_key:
|
|
||||||
print("Warning: OPENROUTER_API_KEY environment variable not set. API calls may fail.")
|
|
||||||
self.model = args.model or os.environ.get("AI_MODEL", DEFAULT_MODEL)
|
self.model = args.model or os.environ.get("AI_MODEL", DEFAULT_MODEL)
|
||||||
self.api_url = args.api_url or os.environ.get("API_URL", DEFAULT_API_URL)
|
self.api_url = args.api_url or os.environ.get("API_URL", DEFAULT_API_URL)
|
||||||
self.model_list_url = args.model_list_url or os.environ.get(
|
self.model_list_url = args.model_list_url or os.environ.get(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user