Skip to content

Commit 3000258

Browse files
committed
Revert codex additions that snuck into favicon commit
1 parent 1c519b0 commit 3000258

2 files changed

Lines changed: 0 additions & 19 deletions

File tree

src/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { createLoggingMiddleware } from './logging';
55
import { GatewayProxy } from './gateway';
66
import { JwtVerifier } from './jwt';
77
import { ModelCatalog } from './models';
8-
import { CodexCatalog } from './codex';
98
import { icLogoFaviconSvg, landingPage } from './landing';
109

1110
type Bindings = {
@@ -41,8 +40,6 @@ app.get('/.well-known/opencode', async (c) => {
4140
return c.json(buildDiscoveryPayload(origin, modelsByGateway));
4241
});
4342

44-
app.get('/.well-known/codex', (c) => c.json(new CodexCatalog().payload()));
45-
4643
app.use('/v1/*', async (c, next) => {
4744
const provider = c.req.path.split('/')[2];
4845
if (!provider || !isGatewayProvider(provider)) return c.json({ error: 'Unknown provider' }, 404);

test/index.spec.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -98,22 +98,6 @@ describe('integration', () => {
9898
expect(response.status).toBe(404);
9999
});
100100

101-
it('returns codex rules without authentication', async () => {
102-
const response = await SELF.fetch('https://opencode.icap.dev/.well-known/codex');
103-
expect(response.status).toBe(200);
104-
105-
const body = (await response.json()) as {
106-
version: number;
107-
count: number;
108-
rules: Array<{ id: string; title: string; category: string; severity: string; rationale: string }>;
109-
};
110-
expect(body.version).toBe(1);
111-
expect(body.count).toBe(body.rules.length);
112-
expect(body.rules.length).toBeGreaterThan(0);
113-
expect(body.rules.every((r) => /^IC-[A-Z]+-\d{3}$/.test(r.id))).toBe(true);
114-
expect(body.rules.some((r) => r.id === 'IC-TEST-009' && r.title === 'Avoid mocks')).toBe(true);
115-
});
116-
117101
it('returns 404 for unknown providers without requiring authentication', async () => {
118102
const response = await SELF.fetch('https://opencode.icap.dev/v1/groq/v1/messages', {
119103
method: 'POST',

0 commit comments

Comments
 (0)