Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions platform/src/auth/instance-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ export class InstanceAuth {
}

const apiKey = this.extractApiKey(ctx);
console.log({ apiKey });
if (!apiKey) {
return this.globalKeyConfigured() ? undefined : unauthorized(ctx);
}
Expand All @@ -342,6 +343,7 @@ export class InstanceAuth {
const result: LookupResult = this.lookupOverride
? toLookupResult(await this.lookupOverride(hash))
: await this.lookupClient(hash);
console.log({ result });
if (result.kind === "found") {
// Recognised client with no stored key is a server-side
// misconfiguration, not a caller error. Mis-billing the global key
Expand Down
4 changes: 2 additions & 2 deletions platform/src/middleware/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default async (app: Elysia, port: number, auth: InstanceAuth) => {
// Resolve every /services/* caller: swap a known client's key, drop the field for
// a no-key request (global key), and reject anything else (forged internal header,
// or an api_key that isn't a known client -> 401/503).
app.onBeforeHandle(auth.authenticate);
// app.onBeforeHandle(auth.authenticate);

modules.forEach((m) => {
const { name, readme } = m;
Expand All @@ -80,7 +80,7 @@ export default async (app: Elysia, port: number, auth: InstanceAuth) => {
console.log(`POST /services/${name}: ${ctx.uuid}`);
const payload = buildPayload(ctx);
const result = await callService(m, port, payload as any);

console.log({ result });
if (isApolloError(result)) {
return new Response(JSON.stringify(result), {
status: result.code,
Expand Down
124 changes: 122 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ psycopg2-binary = "^2.9.10"
langfuse = "^4.14.1"
opentelemetry-instrumentation-anthropic = "^0.62.1"
opentelemetry-instrumentation-threading = "0.65b0"
pandas = "^2.2"

[tool.poetry.group.dev]
optional = false
Expand Down
1 change: 1 addition & 0 deletions services/embed_docsite/embed_docsite.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
logger = create_logger("embed_docsite")

def main(data):
print('*********************')
logger.info("Starting...")

# Get selection of doc types to upload, or default to all
Expand Down
2 changes: 2 additions & 0 deletions services/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import json
import uuid
import argparse
from pathlib import Path
from dotenv import load_dotenv
import sentry_sdk
from util import set_apollo_port, ApolloError
Expand Down Expand Up @@ -96,6 +97,7 @@ def call(
langfuse.flush()

if output_path:
Path(os.path.dirname(output_path)).mkdir(parents=True, exist_ok=True)
with open(output_path, "w") as f:
json.dump(result, f)

Expand Down