GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: resolve orgs from workspace session tokens in AI Gateway requests by SasSwart · Pull Request #30902 · coder/coder

Conversation

@SasSwart

@SasSwart SasSwart commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Add an AI Gateway org resolver at the coderd IsAuthorized boundary, detect workspace session tokens, load the workspace org, validate the user is still a member of that org, reject missing workspaces or invalid membership, and return the resolved org in IsAuthorizedResponse while leaving it unused by downstream policy. Include tests for successful workspace-token resolution, missing workspace rejection, invalid org membership rejection, and compatibility with the existing ServeHTTP flow.

Fixes AIGOV-714

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@SasSwart
Resolve AI Gateway orgs from workspace session tokens
faafcdd
@linear-code

linear-code Bot commented Oct 16, 2026

Copy link
Copy Markdown

AIGOV-714

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot assigned SasSwart Oct 16, 2026
SasSwart added 2 commits October 16, 2026 14:50
@SasSwart
Merge main into sdlcgraph/aigov-714-1
b3f7b78
# Conflicts:
#	coderd/aibridged/aibridged_test.go
#	coderd/aibridged/proto/aibridged.pb.go
#	coderd/aibridged/proto/aibridged.proto
#	coderd/aibridged/proto/version.go
@SasSwart
Merge main into sdlcgraph/aigov-714-1
d73b4b9
@SasSwart
SasSwart requested a review from mtojek October 19, 2026 07:52
@SasSwart SasSwart changed the title Resolve AI Gateway orgs from workspace session tokens feat: resolve orgs from workspace session tokens in AI Gateway requests Oct 19, 2026
@mtojek

mtojek commented Oct 19, 2026

Copy link
Copy Markdown
Member

@SasSwart I see this is a draft, and make gen is failing. Should I wait for the final PR?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@SasSwart
SasSwart marked this pull request as ready for review October 19, 2026 08:06
mtojek
mtojek reviewed Oct 19, 2026
View reviewed changes
Comment thread coderd/aibridgedserver/aibridgedserver.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread coderd/aibridgedserver/orgresolver.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

SasSwart added 2 commits October 19, 2026 08:40
@SasSwart
Address feedback in: Resolve AI Gateway orgs from workspace session t…
f215c65
…okens
@SasSwart
Address review comments in: Resolve AI Gateway orgs from workspace se…
1f2c236
…ssion tokens
mtojek
mtojek reviewed Oct 19, 2026
View reviewed changes
Comment thread coderd/aibridgedserver/orgresolver.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Oct 21, 2026
feat(coderd): store the organization on AI Gateway interceptions #31118
Merged
feat: limit effective group resolution to an organization #31119
Merged
feat: use the resolved organization for AI Gateway budgets and cost (1/2) #31120
Merged
feat: price AI Gateway token usage with the request organization (2/2) #31121
Merged
@SasSwart
refactor(coderd/aibridgedserver): move resolveOrganization into aibri…
4e3ff79
…dgedserver.go
@SasSwart
SasSwart requested review from mtojek and ssncferreira October 23, 2026 04:25
mtojek
mtojek approved these changes Oct 23, 2026
View reviewed changes

@mtojek mtojek left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@SasSwart
SasSwart merged commit 946c2f0 into main Oct 26, 2026
29 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@SasSwart
SasSwart deleted the sdlcgraph/aigov-714-1 branch October 26, 2026 09:40
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@mtojek mtojek mtojek approved these changes
@ssncferreira ssncferreira Awaiting requested review from ssncferreira

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@SasSwart SasSwart

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@SasSwart @mtojek
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.