Compare commits

...

1 Commits

Author SHA1 Message Date
Timmy
90422b45e7 fix(#1415): Resolve port 8080 conflict - L402 8080->8081
Some checks failed
Review Approval Gate / verify-review (pull_request) Failing after 9s
CI / test (pull_request) Failing after 43s
CI / validate (pull_request) Failing after 43s
l402_server.py: configurable via L402_PORT, default 8081
app.js: cost-estimate URL :8080 -> :8081

Fixes #1415
2026-04-14 14:23:55 -04:00
2 changed files with 5 additions and 2 deletions

2
app.js
View File

@@ -681,7 +681,7 @@ function updateGOFAI(delta, elapsed) {
// Simulate calibration update
calibrator.update({ input_tokens: 100, complexity_score: 0.5 }, 0.06);
if (Math.random() > 0.95) l402Client.fetchWithL402("http://localhost:8080/api/cost-estimate");
if (Math.random() > 0.95) l402Client.fetchWithL402("http://localhost:8081/api/cost-estimate");
}
metaLayer.track(startTime);

View File

@@ -2,6 +2,7 @@
#!/usr/bin/env python3
from http.server import HTTPServer, BaseHTTPRequestHandler
import json
import os
import secrets
class L402Handler(BaseHTTPRequestHandler):
@@ -25,7 +26,9 @@ class L402Handler(BaseHTTPRequestHandler):
self.send_response(404)
self.end_headers()
def run(server_class=HTTPServer, handler_class=L402Handler, port=8080):
def run(server_class=HTTPServer, handler_class=L402Handler, port=None):
if port is None:
port = int(os.environ.get('L402_PORT', 8081))
server_address = ('', port)
httpd = server_class(server_address, handler_class)
print(f"Starting L402 Skeleton Server on port {port}...")